Revision 30754 branches/v2_0_0_prep/libraries/libFMap_dal/src-test/org/gvsig/fmap/dal/feature/BaseTestFeatureStore.java
BaseTestFeatureStore.java | ||
---|---|---|
37 | 37 |
import java.util.Random; |
38 | 38 |
import java.util.TreeSet; |
39 | 39 |
|
40 |
import junit.framework.TestCase; |
|
41 |
|
|
42 | 40 |
import org.gvsig.fmap.dal.DALLocator; |
43 | 41 |
import org.gvsig.fmap.dal.DataManager; |
44 | 42 |
import org.gvsig.fmap.dal.DataServerExplorer; |
... | ... | |
58 | 56 |
import org.gvsig.tools.evaluator.EvaluatorData; |
59 | 57 |
import org.gvsig.tools.evaluator.EvaluatorException; |
60 | 58 |
import org.gvsig.tools.evaluator.EvaluatorFieldsInfo; |
61 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
|
|
59 |
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
|
|
62 | 60 |
import org.gvsig.tools.persistence.PersistenceException; |
63 | 61 |
import org.gvsig.tools.persistence.PersistentState; |
64 | 62 |
import org.slf4j.Logger; |
... | ... | |
68 | 66 |
* @author jmvivo |
69 | 67 |
* |
70 | 68 |
*/ |
71 |
public abstract class BaseTestFeatureStore extends TestCase { |
|
69 |
public abstract class BaseTestFeatureStore extends |
|
70 |
AbstractLibraryAutoInitTestCase { |
|
72 | 71 |
|
73 | 72 |
private static Logger logger = null; |
74 | 73 |
|
75 |
protected static DataManager dataManager = null; |
|
76 |
protected boolean baseTestInitialized = false; |
|
74 |
protected DataManager dataManager = null; |
|
77 | 75 |
private static Random rnd; |
78 | 76 |
|
79 | 77 |
public Logger getLogger() { |
... | ... | |
103 | 101 |
public abstract DataStoreParameters getDefaultDataStoreParameters() |
104 | 102 |
throws DataException; |
105 | 103 |
|
106 |
/* |
|
107 |
* (non-Javadoc) |
|
108 |
* |
|
109 |
* @see junit.framework.TestCase#setUp() |
|
110 |
*/ |
|
111 |
protected void setUp() throws Exception { |
|
112 |
super.setUp(); |
|
113 | 104 |
|
114 |
if (baseTestInitialized) { |
|
115 |
return; |
|
116 |
} |
|
117 |
|
|
118 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
119 |
// ToolsLibrary tools = new ToolsLibrary(); |
|
120 |
// tools.initialize(); |
|
121 |
// tools.postInitialize(); |
|
122 |
// |
|
123 |
// XMLPersistenceLibrary xmlPersistence = new XMLPersistenceLibrary(); |
|
124 |
// xmlPersistence.initialize(); |
|
125 |
// xmlPersistence.postInitialize(); |
|
126 |
// |
|
127 |
// DALLibrary lib = new DALLibrary(); |
|
128 |
// lib.initialize(); |
|
129 |
// lib.postInitialize(); |
|
130 |
// |
|
131 |
// DALDefaultImplLibrary libImpl = new DALDefaultImplLibrary(); |
|
132 |
// libImpl.initialize(); |
|
133 |
// libImpl.postInitialize(); |
|
134 |
|
|
105 |
protected void doSetUp() throws Exception { |
|
135 | 106 |
dataManager = DALLocator.getDataManager(); |
136 |
baseTestInitialized = true; |
|
137 |
|
|
138 | 107 |
} |
139 | 108 |
|
140 | 109 |
|
141 |
|
|
142 | 110 |
//================================================= |
143 | 111 |
|
144 | 112 |
|
Also available in: Unified diff