3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.store
.operations
;
13 import org
.apache
.log4j
.Logger
;
14 import org
.eclipse
.core
.commands
.ExecutionException
;
15 import org
.junit
.BeforeClass
;
16 import org
.junit
.Test
;
18 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
19 import eu
.etaxonomy
.cdm
.model
.name
.NonViralName
;
20 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
27 public class ChangeTaxonToSynonymOperationTest
{
28 private static final Logger logger
= Logger
29 .getLogger(ChangeTaxonToSynonymOperationTest
.class);
31 private static AbstractPostOperation operation
;
33 private static Taxon taxon
;
36 * @throws java.lang.Exception
39 public static void setUpBeforeClass() throws Exception
{
41 taxon
= Taxon
.NewInstance(NonViralName
.NewInstance(null), null);
43 operation
= new ChangeTaxonToSynonymOperation("Change Taxon To Synonym", null, taxon
);
47 * Test method for {@link eu.etaxonomy.taxeditor.store.operations.ChangeTaxonToSynonymOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
48 * @throws ExecutionException
51 public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException
{
52 operation
.execute(null, null);
54 logger
.warn("Can not test. Integration test needed.");
58 * Test method for {@link eu.etaxonomy.taxeditor.store.operations.ChangeTaxonToSynonymOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
59 * @throws ExecutionException
62 public void testUndoIProgressMonitorIAdaptable() throws ExecutionException
{
63 operation
.undo(null, null);
65 logger
.warn("Can not test. Integration test needed.");
69 * Test method for {@link eu.etaxonomy.taxeditor.store.operations.ChangeTaxonToSynonymOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
70 * @throws ExecutionException
73 public void testRedoIProgressMonitorIAdaptable() throws ExecutionException
{
74 operation
.redo(null, null);
76 logger
.warn("Can not test. Integration test needed.");
80 * Test method for {@link eu.etaxonomy.taxeditor.store.operations.AbstractPostOperation#postExecute(CdmBase)}.
83 public void testPostExecute() {
84 // TODO there is not post operation functionality for this class
85 // at the moment. Implement test when there is.
86 logger
.warn("No post operation functionality for this class");