Project

General

Profile

Download (3.25 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.store.operations;
12

    
13
import static org.junit.Assert.*;
14

    
15
import org.apache.log4j.Logger;
16
import org.eclipse.core.commands.ExecutionException;
17
import org.eclipse.core.commands.operations.IUndoContext;
18
import org.eclipse.core.runtime.IAdaptable;
19
import org.eclipse.core.runtime.IProgressMonitor;
20
import org.junit.BeforeClass;
21
import org.junit.Test;
22

    
23
import eu.etaxonomy.cdm.model.common.CdmBase;
24
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
25
import eu.etaxonomy.cdm.model.taxon.Synonym;
26
import eu.etaxonomy.cdm.model.taxon.Taxon;
27

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

    
37
	private static Synonym synonym;
38

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

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

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

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

    
89
	/**
90
	 * Test method for {@link eu.etaxonomy.taxeditor.store.operations.AbstractPostOperation#postExecute(CdmBase)}.
91
	 */
92
	@Test
93
	public void testPostExecute() {
94
		// TODO there is not post operation functionality for this class
95
		// at the moment. Implement test when there is.
96
		logger.warn("No post operation functionality for this class");
97
	}
98
}
(5-5/22)