Revision 30580 branches/v2_0_0_prep/extensions/org.gvsig.symbology/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/symbol/TestISymbol.java
TestISymbol.java | ||
---|---|---|
14 | 14 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
15 | 15 |
import org.gvsig.fmap.geom.Geometry.TYPES; |
16 | 16 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
17 |
import org.gvsig.fmap.geom.impl.DefaultGeometryLibrary; |
|
18 | 17 |
import org.gvsig.fmap.geom.primitive.Curve; |
19 | 18 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
20 | 19 |
import org.gvsig.fmap.geom.primitive.Point; |
21 | 20 |
import org.gvsig.fmap.geom.primitive.Surface; |
22 |
import org.gvsig.fmap.mapcontext.rendering.symbol.AbstractSymbolTestCase; |
|
23 | 21 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
24 | 22 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ITextSymbol; |
25 | 23 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol; |
26 | 24 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol; |
27 | 25 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol; |
28 |
import org.gvsig.utils.XMLException;
|
|
26 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
|
|
29 | 27 |
|
30 | 28 |
/** |
31 | 29 |
* Integration test to ensure that the symbols follow the rules that follow the |
... | ... | |
71 | 69 |
protected void setUp() throws Exception { |
72 | 70 |
symbols = getNewSymbolInstances(); |
73 | 71 |
|
74 |
DefaultGeometryLibrary lib = new DefaultGeometryLibrary(); |
|
75 |
lib.initialize(); |
|
76 |
lib.postInitialize(); |
|
72 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
73 |
|
|
74 |
// DefaultGeometryLibrary lib = new DefaultGeometryLibrary(); |
|
75 |
// lib.initialize(); |
|
76 |
// lib.postInitialize(); |
|
77 | 77 |
} |
78 | 78 |
|
79 | 79 |
public void testPointSuitability() throws InstantiationException, IllegalAccessException, CreateGeometryException { |
... | ... | |
224 | 224 |
} |
225 | 225 |
} |
226 | 226 |
|
227 |
/** |
|
228 |
* ensures that any symbol has a description in its persistence |
|
229 |
* (very important) |
|
230 |
*/ |
|
231 |
public void testDescription() { |
|
232 |
for (int i = 0; i < symbols.length; i++) { |
|
233 |
try { |
|
234 |
assertTrue(symbols[i].getClass().getName() + " does not declare a description in its XMLEntity", |
|
235 |
symbols[i].getXMLEntity().contains("desc")); |
|
236 |
} catch (XMLException e) { |
|
237 |
// TODO Auto-generated catch block |
|
238 |
e.printStackTrace(); |
|
239 |
} |
|
240 |
} |
|
241 |
} |
|
227 |
// /**
|
|
228 |
// * ensures that any symbol has a description in its persistence
|
|
229 |
// * (very important)
|
|
230 |
// */
|
|
231 |
// public void testDescription() {
|
|
232 |
// for (int i = 0; i < symbols.length; i++) {
|
|
233 |
// try {
|
|
234 |
// assertTrue(symbols[i].getClass().getName() + " does not declare a description in its XMLEntity",
|
|
235 |
// symbols[i].getXMLEntity().contains("desc"));
|
|
236 |
// } catch (XMLException e) {
|
|
237 |
// // TODO Auto-generated catch block
|
|
238 |
// e.printStackTrace();
|
|
239 |
// }
|
|
240 |
// }
|
|
241 |
// }
|
|
242 | 242 |
|
243 |
/** |
|
244 |
* ensures that any symbol has an isShapeVisible field in its persistence |
|
245 |
* (very important) |
|
246 |
*/ |
|
247 |
public void testIsShapeVisible() { |
|
248 |
for (int i = 0; i < symbols.length; i++) { |
|
249 |
try { |
|
250 |
assertTrue(symbols[i].getClass().getName() + " does not declare the isShapeVisible field in its XMLEntity", |
|
251 |
symbols[i].getXMLEntity().contains("isShapeVisible")); |
|
252 |
} catch (XMLException e) { |
|
253 |
// TODO Auto-generated catch block |
|
254 |
e.printStackTrace(); |
|
255 |
} |
|
256 |
} |
|
257 |
} |
|
243 |
// /**
|
|
244 |
// * ensures that any symbol has an isShapeVisible field in its persistence
|
|
245 |
// * (very important)
|
|
246 |
// */
|
|
247 |
// public void testIsShapeVisible() {
|
|
248 |
// for (int i = 0; i < symbols.length; i++) {
|
|
249 |
// try {
|
|
250 |
// assertTrue(symbols[i].getClass().getName() + " does not declare the isShapeVisible field in its XMLEntity",
|
|
251 |
// symbols[i].getXMLEntity().contains("isShapeVisible"));
|
|
252 |
// } catch (XMLException e) {
|
|
253 |
// // TODO Auto-generated catch block
|
|
254 |
// e.printStackTrace();
|
|
255 |
// }
|
|
256 |
// }
|
|
257 |
// }
|
|
258 | 258 |
|
259 | 259 |
/** |
260 | 260 |
* ensures that the symbol is self-defining |
Also available in: Unified diff