Revision df390232
Added by Cherian Mathew almost 9 years ago
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/cdm/model/TaxonNameEditorTest.java | ||
---|---|---|
18 | 18 |
import org.apache.log4j.Logger; |
19 | 19 |
import org.eclipse.core.commands.ExecutionException; |
20 | 20 |
import org.junit.Assert; |
21 |
import org.junit.Before; |
|
22 | 21 |
import org.junit.BeforeClass; |
23 | 22 |
import org.junit.Test; |
24 | 23 |
import org.unitils.dbunit.annotation.DataSet; |
... | ... | |
36 | 35 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
37 | 36 |
import eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInExistingHomotypicalGroupOperation; |
38 | 37 |
import eu.etaxonomy.taxeditor.operations.OperationTestBase; |
39 |
import eu.etaxonomy.taxeditor.remoting.cache.CdmTransientEntityCacher; |
|
40 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySession; |
|
41 |
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled; |
|
42 | 38 |
import eu.etaxonomy.taxeditor.session.MockSessionOwner; |
43 | 39 |
|
44 | 40 |
/** |
... | ... | |
56 | 52 |
IClassificationService classificationService = getRemoteApplicationController().getClassificationService(); |
57 | 53 |
|
58 | 54 |
|
59 |
private CdmTransientEntityCacher cacher; |
|
60 |
private ICdmEntitySessionEnabled sessionOwner; |
|
61 | 55 |
|
62 |
private ICdmEntitySession cdmEntitySession; |
|
63 | 56 |
|
64 | 57 |
Language english = Language.getLanguageFromUuid(Language.uuidEnglish); |
65 | 58 |
|
... | ... | |
69 | 62 |
public static void initializePolytomousKeyTest() { |
70 | 63 |
} |
71 | 64 |
|
72 |
@Before |
|
73 |
public void initializeSession() { |
|
74 |
sessionOwner = new MockSessionOwner(); |
|
75 |
cdmEntitySession = cdmEntitySessionManager.newSession(sessionOwner, true); |
|
76 |
cacher = getCacher(sessionOwner); |
|
77 |
} |
|
78 | 65 |
|
79 | 66 |
@Test |
80 | 67 |
public void testAddHomotypicSynonym() throws ExecutionException { |
Also available in: Unified diff
RemotingSessionAwareTest : added new class which handles pre-config of test classes which require a session
*Test.java : set super class to RemotingSessionAwareTest
*.xml : removed DefinedTermBase entites from datasets so that the terms are not deleted
ServiceInterceptorTest : correction