Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / org.gvsig.symbology / org.gvsig.symbology.lib / org.gvsig.symbology.lib.impl / src / test / java / org / gvsig / symbology / fmap / mapcontext / rendering / AllTests.java @ 34294

History | View | Annotate | Download (3.9 KB)

1
package org.gvsig.symbology.fmap.mapcontext.rendering;
2

    
3
import java.io.File;
4

    
5
import junit.framework.Test;
6
import junit.framework.TestCase;
7
import junit.framework.TestSuite;
8

    
9
import org.cresques.cts.IProjection;
10
import org.gvsig.fmap.crs.CRSFactory;
11
import org.gvsig.fmap.mapcontext.MapContext;
12
import org.gvsig.fmap.mapcontext.ViewPort;
13
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
14
import org.gvsig.fmap.mapcontext.layers.FLayer;
15
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestDrawFills;
16
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestDrawLines;
17
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestDrawMarkers;
18
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestISymbol;
19
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestMultiLayerSymbol;
20

    
21
public class AllTests extends TestCase{
22
        /**
23
         * The EPSG:4326 projection
24
         */
25
        public static IProjection TEST_DEFAULT_PROJECTION =
26
                CRSFactory.getCRS("EPSG:4326");
27

    
28
        /**
29
         * The EPSG:23030 projection
30
         */
31
        public static IProjection TEST_DEFAULT_MERCATOR_PROJECTION =
32
                CRSFactory.getCRS("EPSG:23030");
33

    
34
        /**
35
         * The EPSG:23029 projection
36
         */
37
        public static IProjection test_newProjection =
38
                CRSFactory.getCRS("EPSG:23029");
39

    
40
        public static Test suite() {
41
                TestSuite suite = new TestSuite("Test for com.iver.cit.gvsig.fmap");
42
                //$JUnit-BEGIN$
43

    
44

    
45
//                /* Symbols (jaume) */
46
//                        // integration tests
47
//                                // ISymbol
48
//                                suite.addTestSuite(TestISymbol.class);
49
//                                suite.addTestSuite(TestMultiLayerSymbol.class);
50
//
51
//                                // CartographicSupport
52
//                                suite.addTestSuite(TestCartographicSupportForSymbol.class);
53
//
54
//                //
55
//                /*
56
//                 * Feature iterators
57
//                 * */
58
////                suite.addTestSuite(FeatureIteratorTest.class);
59
//
60
//                /*
61
//                 * Other Tests present in FMap (cesar)
62
//                 * Remove them from here and the src-test dir if they are not
63
//                 * useful anymore.
64
//                 */
65
//
66
////                suite.addTestSuite(TestAbstractIntervalLegend.class);
67
//                suite.addTestSuite(TestCartographicSupportForSymbol.class);
68
//                suite.addTestSuite(TestDrawFills.class);
69
//                suite.addTestSuite(TestDrawLines.class);
70
//                suite.addTestSuite(TestDrawMarkers.class);
71
////                suite.addTestSuite(TestIClassifiedLegend.class);
72
////                suite.addTestSuite(TestILegend.class);
73
//                suite.addTestSuite(TestMultiLayerSymbol.class);
74

    
75
                //$JUnit-END$
76
                return suite;
77
        }
78

    
79
//// jaume
80
//// PASTED FROM FeatureIteratorTest.java to be globally accessible
81
        static final String fwAndamiDriverPath = "../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/drivers";
82
        private static File baseDataPath;
83
        private static File baseDriversPath;
84

    
85

    
86
        public static void setUpDrivers() {
87
//                try {
88
//                        URL url = AllTests.class.getResource("testdata");
89
//                        if (url == null)
90
//                                throw new Exception("No se encuentra el directorio con datos de prueba");
91
//
92
//                        baseDataPath = new File(url.getFile());
93
//                        if (!baseDataPath.exists())
94
//                                throw new Exception("No se encuentra el directorio con datos de prueba");
95
//
96
//                        baseDriversPath = new File(fwAndamiDriverPath);
97
//                        if (!baseDriversPath.exists())
98
//                                throw new Exception("Can't find drivers path: " + fwAndamiDriverPath);
99
//
100
//                        LayerFactory.setDriversPath(baseDriversPath.getAbsolutePath());
101
//                        if (LayerFactory.getDM().getDriverNames().length < 1)
102
//                                throw new Exception("Can't find drivers in path: " + fwAndamiDriverPath);
103
//                } catch (Exception e) {
104
//                        throw new RuntimeException(e);
105
//                }
106
        }
107

    
108
        public static FLayer newLayer(String fileName,
109
                        String driverName)
110
        throws LoadLayerException {
111
//                File file = new File(baseDataPath, fileName);
112
//                return LayerFactory.createLayer(fileName,
113
//                                driverName,
114
//                                file, TEST_DEFAULT_MERCATOR_PROJECTION);
115
        return null;
116
        }
117

    
118
        public static MapContext newMapContext(IProjection projection) {
119
                ViewPort vp = new ViewPort(projection);
120
                return new MapContext(vp);
121
        }
122

    
123
//// end past
124
}