svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.symbology / org.gvsig.symbology.lib / org.gvsig.symbology.lib.impl / src / test / java / org / gvsig / symbology / fmap / mapcontext / rendering / AllTests.java @ 40560
History | View | Annotate | Download (4.86 KB)
1 | 40560 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | *
|
||
4 | * Copyright (C) 2007-2013 gvSIG Association.
|
||
5 | *
|
||
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 3
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
19 | * MA 02110-1301, USA.
|
||
20 | *
|
||
21 | * For any additional information, do not hesitate to contact us
|
||
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | */
|
||
24 | 40435 | jjdelcerro | package org.gvsig.symbology.fmap.mapcontext.rendering; |
25 | |||
26 | import java.io.File; |
||
27 | |||
28 | import junit.framework.Test; |
||
29 | import junit.framework.TestCase; |
||
30 | import junit.framework.TestSuite; |
||
31 | |||
32 | import org.cresques.cts.IProjection; |
||
33 | import org.gvsig.fmap.crs.CRSFactory; |
||
34 | import org.gvsig.fmap.mapcontext.MapContext; |
||
35 | import org.gvsig.fmap.mapcontext.ViewPort; |
||
36 | import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
||
37 | import org.gvsig.fmap.mapcontext.layers.FLayer; |
||
38 | import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestDrawFills; |
||
39 | import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestDrawLines; |
||
40 | import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestDrawMarkers; |
||
41 | import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestISymbol; |
||
42 | import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestMultiLayerSymbol; |
||
43 | |||
44 | public class AllTests extends TestCase{ |
||
45 | /**
|
||
46 | * The EPSG:4326 projection
|
||
47 | */
|
||
48 | public static IProjection TEST_DEFAULT_PROJECTION = |
||
49 | CRSFactory.getCRS("EPSG:4326");
|
||
50 | |||
51 | /**
|
||
52 | * The EPSG:23030 projection
|
||
53 | */
|
||
54 | public static IProjection TEST_DEFAULT_MERCATOR_PROJECTION = |
||
55 | CRSFactory.getCRS("EPSG:23030");
|
||
56 | |||
57 | /**
|
||
58 | * The EPSG:23029 projection
|
||
59 | */
|
||
60 | public static IProjection test_newProjection = |
||
61 | CRSFactory.getCRS("EPSG:23029");
|
||
62 | |||
63 | public static Test suite() { |
||
64 | TestSuite suite = new TestSuite("Test for com.iver.cit.gvsig.fmap"); |
||
65 | //$JUnit-BEGIN$
|
||
66 | |||
67 | |||
68 | // /* Symbols (jaume) */
|
||
69 | // // integration tests
|
||
70 | // // ISymbol
|
||
71 | // suite.addTestSuite(TestISymbol.class);
|
||
72 | // suite.addTestSuite(TestMultiLayerSymbol.class);
|
||
73 | //
|
||
74 | // // CartographicSupport
|
||
75 | // suite.addTestSuite(TestCartographicSupportForSymbol.class);
|
||
76 | //
|
||
77 | // //
|
||
78 | // /*
|
||
79 | // * Feature iterators
|
||
80 | // * */
|
||
81 | //// suite.addTestSuite(FeatureIteratorTest.class);
|
||
82 | //
|
||
83 | // /*
|
||
84 | // * Other Tests present in FMap (cesar)
|
||
85 | // * Remove them from here and the src-test dir if they are not
|
||
86 | // * useful anymore.
|
||
87 | // */
|
||
88 | //
|
||
89 | //// suite.addTestSuite(TestAbstractIntervalLegend.class);
|
||
90 | // suite.addTestSuite(TestCartographicSupportForSymbol.class);
|
||
91 | // suite.addTestSuite(TestDrawFills.class);
|
||
92 | // suite.addTestSuite(TestDrawLines.class);
|
||
93 | // suite.addTestSuite(TestDrawMarkers.class);
|
||
94 | //// suite.addTestSuite(TestIClassifiedLegend.class);
|
||
95 | //// suite.addTestSuite(TestILegend.class);
|
||
96 | // suite.addTestSuite(TestMultiLayerSymbol.class);
|
||
97 | |||
98 | //$JUnit-END$
|
||
99 | return suite;
|
||
100 | } |
||
101 | |||
102 | //// jaume
|
||
103 | //// PASTED FROM FeatureIteratorTest.java to be globally accessible
|
||
104 | static final String fwAndamiDriverPath = "../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/drivers"; |
||
105 | private static File baseDataPath; |
||
106 | private static File baseDriversPath; |
||
107 | |||
108 | |||
109 | public static void setUpDrivers() { |
||
110 | // try {
|
||
111 | // URL url = AllTests.class.getResource("testdata");
|
||
112 | // if (url == null)
|
||
113 | // throw new Exception("No se encuentra el directorio con datos de prueba");
|
||
114 | //
|
||
115 | // baseDataPath = new File(url.getFile());
|
||
116 | // if (!baseDataPath.exists())
|
||
117 | // throw new Exception("No se encuentra el directorio con datos de prueba");
|
||
118 | //
|
||
119 | // baseDriversPath = new File(fwAndamiDriverPath);
|
||
120 | // if (!baseDriversPath.exists())
|
||
121 | // throw new Exception("Can't find drivers path: " + fwAndamiDriverPath);
|
||
122 | //
|
||
123 | // LayerFactory.setDriversPath(baseDriversPath.getAbsolutePath());
|
||
124 | // if (LayerFactory.getDM().getDriverNames().length < 1)
|
||
125 | // throw new Exception("Can't find drivers in path: " + fwAndamiDriverPath);
|
||
126 | // } catch (Exception e) {
|
||
127 | // throw new RuntimeException(e);
|
||
128 | // }
|
||
129 | } |
||
130 | |||
131 | public static FLayer newLayer(String fileName, |
||
132 | String driverName)
|
||
133 | throws LoadLayerException {
|
||
134 | // File file = new File(baseDataPath, fileName);
|
||
135 | // return LayerFactory.createLayer(fileName,
|
||
136 | // driverName,
|
||
137 | // file, TEST_DEFAULT_MERCATOR_PROJECTION);
|
||
138 | return null; |
||
139 | } |
||
140 | |||
141 | public static MapContext newMapContext(IProjection projection) { |
||
142 | ViewPort vp = new ViewPort(projection);
|
||
143 | return new MapContext(vp); |
||
144 | } |
||
145 | |||
146 | //// end past
|
||
147 | } |