Statistics
| Revision:

root / trunk / extensions / extPublish / src-test / org / gvsig / publish / util / test_LocalResourcesTestUtilities.java @ 29308

History | View | Annotate | Download (4.69 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004-2006 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *   Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Iba?ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *   +34 963862235
28
 *   gvsig@gva.es
29
 *   www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41
/**
42
 * @author Jos? Vicente Hig?n (josevicente.higon@iver.es)
43
 */
44
package org.gvsig.publish.util;
45

    
46
import java.io.File;
47

    
48
import junit.framework.TestCase;
49

    
50
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
51
import com.iver.cit.gvsig.project.documents.view.ProjectView;
52

    
53
public class test_LocalResourcesTestUtilities extends TestCase {
54
        private LocalResourcesTestUtilities util = null;
55
        protected void setUp() throws Exception {
56
                super.setUp();
57
                File f = null;                
58
                util = new LocalResourcesTestUtilities();
59
                //util.createDBPostGIS();
60
        }
61

    
62
        protected void tearDown() throws Exception {
63
                super.tearDown();
64
        }
65
        
66
        public void test_shapes(){                
67
                ProjectView view = util.getView_shape();
68
                this.assertNotNull(view);
69
                
70
                        try {
71
                                view.getMapContext().getFullExtent();
72
                        } catch (ReadDriverException e) {
73
                                // TODO Auto-generated catch block
74
                                e.printStackTrace();
75
                        }
76
                
77
        }
78
        public void test_raster(){                
79
                ProjectView view = util.getView_raster();
80
                this.assertNotNull(view);
81
                
82
                        try {
83
                                view.getMapContext().getFullExtent();
84
                        } catch (ReadDriverException e) {
85
                                // TODO Auto-generated catch block
86
                                e.printStackTrace();
87
                        }
88
                
89
        }
90
        
91

    
92
        public void test_postgis(){                
93
                ProjectView view = util.getView_postgis();
94
                this.assertNotNull(view);
95
                
96
                        try {
97
                                view.getMapContext().getFullExtent();
98
                        } catch (ReadDriverException e) {
99
                                // TODO Auto-generated catch block
100
                                e.printStackTrace();
101
                        }
102
                
103
        }
104
        public void test_point(){                
105
                ProjectView view = util.getView_point();
106
                this.assertNotNull(view);
107
                
108
                        try {
109
                                view.getMapContext().getFullExtent();
110
                        } catch (ReadDriverException e) {
111
                                // TODO Auto-generated catch block
112
                                e.printStackTrace();
113
                        }
114
                
115
        }
116
        public void test_line(){                
117
                ProjectView view = util.getView_line();
118
                this.assertNotNull(view);
119
                
120
                        try {
121
                                view.getMapContext().getFullExtent();
122
                        } catch (ReadDriverException e) {
123
                                // TODO Auto-generated catch block
124
                                e.printStackTrace();
125
                        }
126
                
127
        }
128
        public void test_polygon(){                
129
                ProjectView view = util.getView_polygon();
130
                this.assertNotNull(view);
131
        
132
                        try {
133
                                view.getMapContext().getFullExtent();
134
                        } catch (ReadDriverException e) {
135
                                // TODO Auto-generated catch block
136
                                e.printStackTrace();
137
                        }
138
        
139
        
140
        }        
141
        public void test_label(){                
142
                ProjectView view = util.getView_label();
143
                this.assertNotNull(view);
144
                
145
                        try {
146
                                view.getMapContext().getFullExtent();
147
                        } catch (ReadDriverException e) {
148
                                // TODO Auto-generated catch block
149
                                e.printStackTrace();
150
                        }
151
                
152
        }                
153
        public void test_group(){                
154
                ProjectView view = util.getView_group();
155
                this.assertNotNull(view);
156
                
157
                        try {
158
                                view.getMapContext().getFullExtent();
159
                        } catch (ReadDriverException e) {
160
                                // TODO Auto-generated catch block
161
                                e.printStackTrace();
162
                        }
163
                
164
        }
165
        public void test_srs(){                
166
                ProjectView view = util.getView_srs();
167
                this.assertNotNull(view);
168
        
169
                        try {
170
                                view.getMapContext().getFullExtent();
171
                        } catch (ReadDriverException e) {
172
                                // TODO Auto-generated catch block
173
                                e.printStackTrace();
174
                        }
175
        
176
        }
177
        public void test_unique_values(){                
178
                ProjectView view = util.getView_unique_values();
179
                this.assertNotNull(view);
180
                
181
                        try {
182
                                view.getMapContext().getFullExtent();
183
                        } catch (ReadDriverException e) {
184
                                // TODO Auto-generated catch block
185
                                e.printStackTrace();
186
                        }
187
                
188
        }
189
        public void test_intervals(){                
190
                ProjectView view = util.getView_intervals();
191
                this.assertNotNull(view);
192
                
193
                        try {
194
                                view.getMapContext().getFullExtent();
195
                        } catch (ReadDriverException e) {
196
                                // TODO Auto-generated catch block
197
                                e.printStackTrace();
198
                        }
199
                
200
        }
201
}