Project

General

Profile

Download (3.26 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
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.
9
*/
10

    
11
package eu.etaxonomy.taxeditor.editor.name.operation;
12

    
13
import org.apache.log4j.Logger;
14
import org.eclipse.core.commands.ExecutionException;
15
import org.junit.BeforeClass;
16
import org.junit.Test;
17

    
18
import eu.etaxonomy.cdm.model.common.ICdmBase;
19
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
20
import eu.etaxonomy.cdm.model.taxon.Synonym;
21
import eu.etaxonomy.cdm.model.taxon.Taxon;
22
import eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicalGroupBasionymOperation;
23
import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
24

    
25
/**
26
 * @author n.hoffmann
27
 * @created 08.04.2009
28
 * @version 1.0
29
 */
30
public class ChangeHomotypicalGroupBasionymOperationTest extends AbstractTaxeditorOperationTestBase {
31
	private static final Logger logger = Logger
32
			.getLogger(ChangeHomotypicalGroupBasionymOperationTest.class);
33

    
34
	private static Synonym synonym;
35

    
36
	private static HomotypicalGroup homotypicalGroup;
37
	
38
	/**
39
	 * @throws java.lang.Exception
40
	 */
41
	@BeforeClass
42
	public static void setUpBeforeClass() throws Exception {
43
		
44
		taxon = Taxon.NewInstance(null, null);
45
		synonym = Synonym.NewInstance(null, null);
46
		homotypicalGroup = HomotypicalGroup.NewInstance();
47
		// FIXME homotypical group and basionym related maethods are not implemented in the library
48
		// wait till this gets done before implementing the test
49
		
50
		operation = new ChangeHomotypicalGroupBasionymOperation("", undoContext, taxon, synonym, postOperation);
51
	}
52

    
53
	/**
54
	 * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicalGroupBasionymOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
55
	 * @throws ExecutionException 
56
	 */
57
	@Test
58
	public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
59
		operation.execute(monitor, info);
60
		
61
		logger.warn("Wating for functionality in library");
62
	}
63

    
64
	/**
65
	 * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicalGroupBasionymOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
66
	 * @throws ExecutionException 
67
	 */
68
	@Test
69
	public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
70
		operation.undo(monitor, info);
71
		
72
		logger.warn("Wating for functionality in library");
73
	}
74

    
75
	/**
76
	 * Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicalGroupBasionymOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
77
	 * @throws ExecutionException 
78
	 */
79
	@Test
80
	public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
81
		operation.redo(monitor, info);
82
		
83
		logger.warn("Wating for functionality in library");
84
	}
85

    
86
	/**
87
	 * Test method for {@link eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation#postExecute(ICdmBase)}.
88
	 */
89
	@Test
90
	public void testPostExecute() {
91
		// TODO there is not post operation functionality for this class
92
		// at the moment. Implement test when there is.
93
		logger.warn("No post operation functionality for this class");
94
	}
95
}
(4-4/17)