2 package eu
.etaxonomy
.taxeditor
.editor
.name
.operation
;
4 import org
.apache
.logging
.log4j
.LogManager
;import org
.apache
.logging
.log4j
.Logger
;
5 import org
.eclipse
.core
.commands
.ExecutionException
;
6 import org
.eclipse
.core
.runtime
.IAdaptable
;
7 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
8 import org
.junit
.BeforeClass
;
11 import eu
.etaxonomy
.cdm
.model
.name
.HomotypicalGroup
;
12 import eu
.etaxonomy
.cdm
.model
.taxon
.Synonym
;
13 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
14 import eu
.etaxonomy
.taxeditor
.operation
.AbstractPostOperation
;
16 public class ChangeSynonymToHomotypicalGroupBasionymOperationTest
{
18 private static final Logger logger
= Logger
.getLogger(ChangeSynonymToHomotypicalGroupBasionymOperationTest
.class);
21 // TODO move this to a superclass
22 public static final IProgressMonitor monitor
= null;
23 public static final IAdaptable info
= null;
25 private static AbstractPostOperation operation
;
27 private static Taxon taxon
;
29 private static Synonym synonym
;
31 private static Synonym basionym
;
33 private static HomotypicalGroup homotypicalGroup
;
36 public static void setUpBeforeClass() throws Exception
{
37 taxon
= Taxon
.NewInstance(null, null);
38 synonym
= Synonym
.NewInstance(null, null);
39 basionym
= Synonym
.NewInstance(null, null);
40 homotypicalGroup
= HomotypicalGroup
.NewInstance();
42 // FIXME homotypical group and basionym related maethods are not implemented in the library
43 // wait till this gets done before implementing the test
45 operation
= new ChangeSynonymToHomotypicalGroupBasionymOperation("Change Synonym To Basionym of Homotypical Group",
46 null, taxon
, synonym
);
50 public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException
{
51 operation
.execute(monitor
, info
);
53 logger
.warn("Wating for functionality in library");
57 public void testUndoIProgressMonitorIAdaptable() throws ExecutionException
{
58 operation
.undo(monitor
, info
);
60 logger
.warn("Wating for functionality in library");
64 public void testRedoIProgressMonitorIAdaptable() throws ExecutionException
{
65 operation
.redo(monitor
, info
);
67 logger
.warn("Wating for functionality in library");
71 public void testPostExecute() {
72 // TODO there is not post operation functionality for this class
73 // at the moment. Implement test when there is.
74 logger
.warn("No post operation functionality for this class");