diff options
Diffstat (limited to 'tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/importfile/ImportRowsSkipAll_V1_V3_V1_MultiColumns_Test.java')
1 files changed, 79 insertions, 0 deletions
diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/importfile/ImportRowsSkipAll_V1_V3_V1_MultiColumns_Test.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/importfile/ImportRowsSkipAll_V1_V3_V1_MultiColumns_Test.java new file mode 100644 index 00000000000..08a668dc5be --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.clazz.config.tests/src/org/eclipse/papyrus/uml/nattable/clazz/config/tests/importfile/ImportRowsSkipAll_V1_V3_V1_MultiColumns_Test.java @@ -0,0 +1,79 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.nattable.clazz.config.tests.importfile; + +import java.util.Map; + +import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand; +import org.eclipse.papyrus.infra.nattable.handler.ImportTableHandler; +import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager; +import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager; +import org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager; +import org.eclipse.papyrus.infra.nattable.utils.UserActionConstants; + +/** + * Test import all of selection with hidden categories. + */ +public class ImportRowsSkipAll_V1_V3_V1_MultiColumns_Test extends AbstractImportRowsTest { + + /** + * Constructor. + */ + public ImportRowsSkipAll_V1_V3_V1_MultiColumns_Test() { + super(); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteInsertTest#removeClassName(java.lang.String) + */ + @Override + public String removeClassName(final String className) throws Exception { + return className.replaceFirst("ImportRowsSkipAll_", ""); //$NON-NLS-1$ //$NON-NLS-2$ k + } + + /** + * Manage the selection with the shift key. + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.importfile.AbstractImportRowsTest#manageSelection(org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager) + */ + @Override + public void manageSelection(final NattableModelManager manager) throws Exception { + super.manageSelection(manager); + manager.getBodyLayerStack().getSelectionLayer().doCommand(new SelectRowsCommand(manager.getBodyLayerStack().getSelectionLayer(), 0, 50, true, false)); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.nattable.generic.tests.insert.AbstractInsertTest#manageParameters(java.util.Map) + */ + @Override + public void manageParameters(final Map<Object, Object> parameters, final INattableModelManager manager) { + super.manageParameters(parameters, manager); + parameters.put(ImportTableHandler.USER_ACTION__PREFERRED_USER_ACTION, UserActionConstants.SKIP_USER_ACTION); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.papyrus.uml.nattable.clazz.config.tests.paste.overwrite.AbstractPasteInsertTest#testUndo_Redo(org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager) + */ + @Override + protected void testUndo_Redo(final TreeNattableModelManager treeManager) throws Exception { + // Do nothing + } +} |