Revision 21156 branches/v2_0_0_prep/libraries/libFMap/src-test/org/gvsig/fmap/AllTests.java

View differences:

AllTests.java
9 9

  
10 10
import org.cresques.cts.IProjection;
11 11
import org.gvsig.fmap.crs.CRSFactory;
12
import org.gvsig.fmap.drivers.formats.dbf.reading.TestDbf;
13
import org.gvsig.fmap.drivers.formats.dgn.reading.TestDgn;
14
import org.gvsig.fmap.drivers.iterators.DBFeatureIteratorTest;
15
import org.gvsig.fmap.drivers.iterators.FeatureIteratorTest;
16
import org.gvsig.fmap.drivers.iterators.PerformanceFeatureIteratorTest;
17
import org.gvsig.fmap.drivers.iterators.spatialindex.SpatialIndexTest;
18 12
import org.gvsig.fmap.mapcontext.MapContext;
19 13
import org.gvsig.fmap.mapcontext.ViewPort;
20 14
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
21 15
import org.gvsig.fmap.mapcontext.layers.FLayer;
22 16
import org.gvsig.fmap.mapcontext.layers.LayerFactory;
23
import org.gvsig.fmap.mapcontext.layers.LayersIteratorTest;
24
import org.gvsig.fmap.mapcontext.rendering.legend.TestAbstractIntervalLegend;
25
import org.gvsig.fmap.mapcontext.rendering.legend.TestIClassifiedLegend;
26
import org.gvsig.fmap.mapcontext.rendering.legend.TestILegend;
27
import org.gvsig.fmap.mapcontext.rendering.symbols.TestCartographicSupportForSymbol;
28
import org.gvsig.fmap.mapcontext.rendering.symbols.TestCartographySupport;
29
import org.gvsig.fmap.mapcontext.rendering.symbols.TestDrawFills;
30
import org.gvsig.fmap.mapcontext.rendering.symbols.TestDrawLines;
31
import org.gvsig.fmap.mapcontext.rendering.symbols.TestDrawMarkers;
32
import org.gvsig.fmap.mapcontext.rendering.symbols.TestISymbol;
33
import org.gvsig.fmap.mapcontext.rendering.symbols.TestMultiLayerSymbol;
17
import org.gvsig.fmap.mapcontext.rendering.TestAbstractIntervalLegend;
18
import org.gvsig.fmap.mapcontext.rendering.TestCartographicSupportForSymbol;
19
import org.gvsig.fmap.mapcontext.rendering.TestIClassifiedLegend;
20
import org.gvsig.fmap.mapcontext.rendering.TestILegend;
21
import org.gvsig.fmap.mapcontext.rendering.symbol.TestDrawFills;
22
import org.gvsig.fmap.mapcontext.rendering.symbol.TestDrawLines;
23
import org.gvsig.fmap.mapcontext.rendering.symbol.TestDrawMarkers;
24
import org.gvsig.fmap.mapcontext.rendering.symbol.TestISymbol;
25
import org.gvsig.fmap.mapcontext.rendering.symbol.TestMultiLayerSymbol;
34 26
import org.gvsig.fmap.mapcontrol.tools.AreaListenerTest;
35 27

  
36 28
import com.vividsolutions.jts.operation.overlay.SnappingOverlayOperationTest;
......
41 33
	 */
42 34
	public static IProjection TEST_DEFAULT_PROJECTION =
43 35
		CRSFactory.getCRS("EPSG:4326");
44
	
36

  
45 37
	/**
46 38
	 * The EPSG:23030 projection
47 39
	 */
48 40
	public static IProjection TEST_DEFAULT_MERCATOR_PROJECTION =
49 41
		CRSFactory.getCRS("EPSG:23030");
50
	
42

  
51 43
	/**
52 44
	 * The EPSG:23029 projection
53 45
	 */
......
58 50
		TestSuite suite = new TestSuite("Test for com.iver.cit.gvsig.fmap");
59 51
		//$JUnit-BEGIN$
60 52

  
61
		/* LayersIterator */
62
			suite.addTestSuite(LayersIteratorTest.class);
63 53

  
64 54

  
65 55
		/* Symbols (jaume) */
......
70 60

  
71 61
				// CartographicSupport
72 62
				suite.addTestSuite(TestCartographicSupportForSymbol.class);
73
				
63

  
74 64
		//
75 65
		/*
76 66
		 * Feature iterators
77 67
		 * */
78
		suite.addTestSuite(FeatureIteratorTest.class);
79
		
68
//		suite.addTestSuite(FeatureIteratorTest.class);
69

  
80 70
		/*
81 71
		 * Other Tests present in FMap (cesar)
82 72
		 * Remove them from here and the src-test dir if they are not
......
84 74
		 */
85 75

  
86 76
		suite.addTestSuite(AreaListenerTest.class);
87
		suite.addTestSuite(DBFeatureIteratorTest.class);
88
		suite.addTestSuite(PerformanceFeatureIteratorTest.class);
77
//		suite.addTestSuite(DBFeatureIteratorTest.class);
78
//		suite.addTestSuite(PerformanceFeatureIteratorTest.class);
89 79
		suite.addTestSuite(SnappingOverlayOperationTest.class);
90
		suite.addTestSuite(SpatialIndexTest.class);
80
//		suite.addTestSuite(SpatialIndexTest.class);
91 81
		suite.addTestSuite(TestAbstractIntervalLegend.class);
92 82
		suite.addTestSuite(TestCartographicSupportForSymbol.class);
93
		suite.addTestSuite(TestDbf.class);
94
		suite.addTestSuite(TestDgn.class);
95 83
		suite.addTestSuite(TestDrawFills.class);
96 84
		suite.addTestSuite(TestDrawLines.class);
97 85
		suite.addTestSuite(TestDrawMarkers.class);
......
111 99

  
112 100

  
113 101
	public static void setUpDrivers() {
114
		try {
115
			URL url = AllTests.class.getResource("testdata");
116
			if (url == null)
117
				throw new Exception("No se encuentra el directorio con datos de prueba");
118

  
119
			baseDataPath = new File(url.getFile());
120
			if (!baseDataPath.exists())
121
				throw new Exception("No se encuentra el directorio con datos de prueba");
122

  
123
			baseDriversPath = new File(fwAndamiDriverPath);
124
			if (!baseDriversPath.exists())
125
				throw new Exception("Can't find drivers path: " + fwAndamiDriverPath);
126

  
127
			LayerFactory.setDriversPath(baseDriversPath.getAbsolutePath());
128
			if (LayerFactory.getDM().getDriverNames().length < 1)
129
				throw new Exception("Can't find drivers in path: " + fwAndamiDriverPath);
130
		} catch (Exception e) {
131
			throw new RuntimeException(e);
132
		}
102
//		try {
103
//			URL url = AllTests.class.getResource("testdata");
104
//			if (url == null)
105
//				throw new Exception("No se encuentra el directorio con datos de prueba");
106
//
107
//			baseDataPath = new File(url.getFile());
108
//			if (!baseDataPath.exists())
109
//				throw new Exception("No se encuentra el directorio con datos de prueba");
110
//
111
//			baseDriversPath = new File(fwAndamiDriverPath);
112
//			if (!baseDriversPath.exists())
113
//				throw new Exception("Can't find drivers path: " + fwAndamiDriverPath);
114
//
115
//			LayerFactory.setDriversPath(baseDriversPath.getAbsolutePath());
116
//			if (LayerFactory.getDM().getDriverNames().length < 1)
117
//				throw new Exception("Can't find drivers in path: " + fwAndamiDriverPath);
118
//		} catch (Exception e) {
119
//			throw new RuntimeException(e);
120
//		}
133 121
	}
134 122

  
135 123
	public static FLayer newLayer(String fileName,
136 124
			String driverName)
137 125
	throws LoadLayerException {
138
		File file = new File(baseDataPath, fileName);
139
		return LayerFactory.createLayer(fileName,
140
				driverName,
141
				file, TEST_DEFAULT_MERCATOR_PROJECTION);
126
//		File file = new File(baseDataPath, fileName);
127
//		return LayerFactory.createLayer(fileName,
128
//				driverName,
129
//				file, TEST_DEFAULT_MERCATOR_PROJECTION);
130
	return null;
142 131
	}
143 132

  
144 133
	public static MapContext newMapContext(IProjection projection) {

Also available in: Unified diff