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