Project

General

Profile

Revision 85f62f44

ID85f62f443927ca357716c742df5446df22783ac2
Parent 5d6c432e
Child 9a7316e0

Added by Katja Luther over 2 years ago

adapt tests

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemotingMoveTaxonNodeHandlerE4.java
32 32
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
33 33
import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
34 34
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
35
import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
35
import eu.etaxonomy.taxeditor.navigation.navigator.e4.TreeNodeDropAdapterE4.MovingType;
36 36
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveTaxonOperation;
37 37
import eu.etaxonomy.taxeditor.operation.e4.RemotingCdmHandlerE4;
38 38
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
eu.etaxonomy.taxeditor.navigation/src/test/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/MoveTaxonOperationTest.java
23 23
import eu.etaxonomy.cdm.model.taxon.Taxon;
24 24
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
25 25
import eu.etaxonomy.taxeditor.navigation.navigator.e4.TreeNodeDropAdapterE4.MovingType;
26
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
26 27
import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
27 28

  
28 29
/**
......
38 39
	private static TaxonNode newParentTaxonNode;
39 40
	private static TaxonNode taxonNode;
40 41

  
42
	static RemotingCdmUpdateOperation navigatorOperation;
43

  
41 44
	/**
42 45
	 * @throws java.lang.Exception
43 46
	 */
......
60 63
		//TODO ??
61 64
		IConversationEnabled conversationEnabled = null;
62 65
		taxonNodeUuidSet.add(taxonNode.getUuid());
63
		operation = new RemotingMoveTaxonOperation(null, true, taxonNodeUuidSet, newParentTaxonNode.getUuid(),  MovingType.CHILD);
66
		navigatorOperation = new RemotingMoveTaxonOperation(null, true, taxonNodeUuidSet, newParentTaxonNode.getUuid(),  MovingType.CHILD);
64 67
	}
65 68

  
66 69
	/**
......
69 72
	 */
70 73
	@Test
71 74
	public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
72
		operation.execute(monitor, info);
75
	    navigatorOperation.execute(monitor, info);
73 76

  
74 77
		Assert.assertEquals(newParentTaxon ,taxon.getTaxonNodes().iterator().next().getParent().getTaxon());
75 78
		Assert.assertEquals(taxon, newParentTaxon.getTaxonNodes().iterator().next().getChildNodes().iterator().next());
......
83 86
	 */
84 87
	@Test
85 88
	public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
86
		operation.undo(monitor, info);
89
	    navigatorOperation.undo(monitor, info);
87 90

  
88 91
		Assert.assertEquals(oldParentTaxon ,taxon.getTaxonNodes().iterator().next().getParent().getTaxon());
89 92
		Assert.assertEquals(0, newParentTaxon.getTaxonNodes().iterator().next().getChildNodes().size());
......
96 99
	 */
97 100
	@Test
98 101
	public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
99
		operation.redo(monitor, info);
102
	    navigatorOperation.redo(monitor, info);
100 103

  
101 104
		Assert.assertEquals(newParentTaxon ,taxon.getTaxonNodes().iterator().next().getParent().getTaxon());
102 105
		Assert.assertEquals(taxon, newParentTaxon.getTaxonNodes().iterator().next().getChildNodes().iterator().next());
eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/AbstractTaxeditorOperationTestBase.java
14 14
import org.eclipse.core.runtime.IProgressMonitor;
15 15

  
16 16
import eu.etaxonomy.cdm.model.taxon.Taxon;
17
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
17 18
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
18
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
19 19
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
20 20

  
21 21
/**
......
32 32
	public static final IPostOperationEnabled postOperation = null;
33 33
	public static final ICdmEntitySessionEnabled cdmEntitySessionEnabled = null;
34 34

  
35
	protected static RemotingCdmUpdateOperation operation;
35
	protected static AbstractPostTaxonOperation operation;
36 36
	protected static Taxon taxon;
37 37
}
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/operation/TaxonNavigatorTest.java
34 34
import eu.etaxonomy.cdm.model.taxon.Taxon;
35 35
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
36 36
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
37
import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
37
import eu.etaxonomy.taxeditor.navigation.navigator.e4.TreeNodeDropAdapterE4.MovingType;
38 38
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingChangeAcceptedTaxonToSynonymOperation;
39 39
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingDeleteTaxonNodeOperation;
40 40
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveFactualDataOperation;

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)