root / branches / v2_0_0_prep / libraries / libRemoteServices / test / org / gvsig / remoteclient / wfs / wfs_1_0_0 / WFSProtocolHandlerTest1_0_0.java @ 34026
History | View | Annotate | Download (3.28 KB)
1 |
package org.gvsig.remoteclient.wfs.wfs_1_0_0; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
|
5 |
import junit.framework.TestCase; |
6 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
7 |
*
|
8 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
9 |
*
|
10 |
* This program is free software; you can redistribute it and/or
|
11 |
* modify it under the terms of the GNU General Public License
|
12 |
* as published by the Free Software Foundation; either version 2
|
13 |
* of the License, or (at your option) any later version.
|
14 |
*
|
15 |
* This program is distributed in the hope that it will be useful,
|
16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18 |
* GNU General Public License for more details.
|
19 |
*
|
20 |
* You should have received a copy of the GNU General Public License
|
21 |
* along with this program; if not, write to the Free Software
|
22 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
23 |
*
|
24 |
* For more information, contact:
|
25 |
*
|
26 |
* Generalitat Valenciana
|
27 |
* Conselleria d'Infraestructures i Transport
|
28 |
* Av. Blasco Ib??ez, 50
|
29 |
* 46010 VALENCIA
|
30 |
* SPAIN
|
31 |
*
|
32 |
* +34 963862235
|
33 |
* gvsig@gva.es
|
34 |
* www.gvsig.gva.es
|
35 |
*
|
36 |
* or
|
37 |
*
|
38 |
* IVER T.I. S.A
|
39 |
* Salamanca 50
|
40 |
* 46005 Valencia
|
41 |
* Spain
|
42 |
*
|
43 |
* +34 963163400
|
44 |
* dac@iver.es
|
45 |
*/
|
46 |
/* CVS MESSAGES:
|
47 |
*
|
48 |
* $Id: WFSProtocolHandlerTest1_0_0.java 34026 2010-11-08 13:06:02Z jpiera $
|
49 |
* $Log$
|
50 |
* Revision 1.2 2006-10-10 12:52:28 jorpiell
|
51 |
* Soporte para features complejas.
|
52 |
*
|
53 |
* Revision 1.1 2006/08/10 12:00:49 jorpiell
|
54 |
* Primer commit del driver de Gml
|
55 |
*
|
56 |
* Revision 1.3 2006/05/23 13:23:13 jorpiell
|
57 |
* Se ha cambiado el final del bucle de parseado y se tiene en cuenta el online resource
|
58 |
*
|
59 |
* Revision 1.2 2006/04/20 16:39:16 jorpiell
|
60 |
* A?adida la operacion de describeFeatureType y el parser correspondiente.
|
61 |
*
|
62 |
* Revision 1.1 2006/04/19 12:51:35 jorpiell
|
63 |
* A?adidas algunas de las clases del servicio WFS
|
64 |
*
|
65 |
*
|
66 |
*/
|
67 |
/**
|
68 |
* @author Jorge Piera Llodr? (piera_jor@gva.es)
|
69 |
*/
|
70 |
public class WFSProtocolHandlerTest1_0_0 extends TestCase { |
71 |
WFSProtocolHandler1_0_0 handler; |
72 |
|
73 |
public void setUp() { |
74 |
System.out.println("Setting up test.."); |
75 |
handler = new WFSProtocolHandler1_0_0();
|
76 |
} |
77 |
|
78 |
public void testParsingDescribeFeatureType() { |
79 |
long t1 = System.currentTimeMillis(); |
80 |
assertTrue(handler.parseCapabilities(new File("testdata/wfs/WFS-dmsolutionsGetCapabilities.xml"))); |
81 |
handler.setCurrentFeature("popplace");
|
82 |
long t2 = System.currentTimeMillis(); |
83 |
System.out.println("Test parsing vivid done with apparently no errors in "+ (t2-(float)t1)/1000+" seconds"); |
84 |
} |
85 |
|
86 |
public void testParsingDescribeFeatureType2() { |
87 |
long t1 = System.currentTimeMillis(); |
88 |
assertTrue(handler.parseCapabilities(new File("testdata/wfs/WFS-sercartlinGetCapabilities.xml"))); |
89 |
handler.setCurrentFeature("topp:tasmania_roads");
|
90 |
long t2 = System.currentTimeMillis(); |
91 |
System.out.println("Test parsing sercartlin done with apparently no errors in "+ (t2-(float)t1)/1000+" seconds"); |
92 |
} |
93 |
|
94 |
public void testParsingDescribeFeatureType3() { |
95 |
long t1 = System.currentTimeMillis(); |
96 |
assertTrue(handler.parseCapabilities(new File("testdata/wfs/WFS-IDEEGetCapabilities.xml"))); |
97 |
handler.setCurrentFeature("BDLL200_Provincia");
|
98 |
long t2 = System.currentTimeMillis(); |
99 |
System.out.println("Test parsing TNT done with apparently no errors in "+ (t2-(float)t1)/1000+" seconds"); |
100 |
} |
101 |
|
102 |
|
103 |
|
104 |
} |