* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-
package eu.etaxonomy.taxeditor.editor.name.operation;
import org.eclipse.core.commands.ExecutionException;
/**
* @author n.hoffmann
* @created 07.04.2009
- * @version 1.0
*/
public class CreateSynonymInNewGroupOperationTest extends AbstractTaxeditorOperationTestBase {
private static TaxonName newSynonymName;
- /**
- * @throws java.lang.Exception
- */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
operation = new CreateSynonymInNewGroupOperation("Create Synonyma In New Group", undoContext, taxon, newSynonymName, postOperation);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
operation.execute(monitor, info);
Assert.assertTrue("Taxon should have a homotypical group now.", taxon.getHomotypicSynonymyGroups().size() > 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
operation.undo(monitor, info);
Assert.assertTrue("Taxon should not have synonyms now.", taxon.getSynonyms().size() == 0);
}
- /**
- * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
- */
@Test
public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
operation.redo(monitor, info);
Assert.assertTrue("Taxon should have synonyms now.", taxon.getSynonyms().size() > 0);
Assert.assertTrue("Taxon should have a homotypical group now.", taxon.getHomotypicSynonymyGroups().size() > 0);
-
}
-}
+}
\ No newline at end of file