svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libRemoteServices / test / org / gvsig / remoteclient / wfs / wfs_1_1_0 / WFSProtocolHandlerTest1_1_0.java @ 29646
History | View | Annotate | Download (3.53 KB)
1 |
package org.gvsig.remoteclient.wfs.wfs_1_1_0; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
|
5 |
import org.gvsig.remoteclient.wfs.wfs_1_0_0.WFSProtocolHandler1_0_0; |
6 |
import org.gvsig.remoteclient.wfs.wfs_1_1_0.WFSProtocolHandler1_1_0; |
7 |
|
8 |
import junit.framework.TestCase; |
9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
10 |
*
|
11 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
12 |
*
|
13 |
* This program is free software; you can redistribute it and/or
|
14 |
* modify it under the terms of the GNU General Public License
|
15 |
* as published by the Free Software Foundation; either version 2
|
16 |
* of the License, or (at your option) any later version.
|
17 |
*
|
18 |
* This program is distributed in the hope that it will be useful,
|
19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
* GNU General Public License for more details.
|
22 |
*
|
23 |
* You should have received a copy of the GNU General Public License
|
24 |
* along with this program; if not, write to the Free Software
|
25 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
26 |
*
|
27 |
* For more information, contact:
|
28 |
*
|
29 |
* Generalitat Valenciana
|
30 |
* Conselleria d'Infraestructures i Transport
|
31 |
* Av. Blasco Ib??ez, 50
|
32 |
* 46010 VALENCIA
|
33 |
* SPAIN
|
34 |
*
|
35 |
* +34 963862235
|
36 |
* gvsig@gva.es
|
37 |
* www.gvsig.gva.es
|
38 |
*
|
39 |
* or
|
40 |
*
|
41 |
* IVER T.I. S.A
|
42 |
* Salamanca 50
|
43 |
* 46005 Valencia
|
44 |
* Spain
|
45 |
*
|
46 |
* +34 963163400
|
47 |
* dac@iver.es
|
48 |
*/
|
49 |
/* CVS MESSAGES:
|
50 |
*
|
51 |
* $Id: WFSProtocolHandlerTest1_1_0.java 29646 2009-06-29 17:05:30Z jpiera $
|
52 |
* $Log$
|
53 |
* Revision 1.1 2007-02-09 14:11:01 jorpiell
|
54 |
* Primer piloto del soporte para WFS 1.1 y para WFS-T
|
55 |
*
|
56 |
*
|
57 |
*/
|
58 |
/**
|
59 |
* @author Jorge Piera Llodr? (piera_jor@gva.es)
|
60 |
*/
|
61 |
public class WFSProtocolHandlerTest1_1_0 extends TestCase { |
62 |
WFSProtocolHandler1_1_0 handler; |
63 |
|
64 |
public void setUp() { |
65 |
System.out.println("Setting up test.."); |
66 |
handler = new WFSProtocolHandler1_1_0();
|
67 |
} |
68 |
|
69 |
public void testParsingDescribeFeatureType1() { |
70 |
// long t1 = System.currentTimeMillis();
|
71 |
// assertTrue(handler.parseCapabilities(new File("test/WFS-1_1_0SercartlinGetCapabilities.xml")));
|
72 |
// handler.setCurrentFeature("popplace");
|
73 |
//
|
74 |
// assertTrue(handler.parseDescribeFeatureType(new File("test/WFS-dmsolutionsDescribeFeatureType.xml"),null));
|
75 |
// long t2 = System.currentTimeMillis();
|
76 |
// System.out.println("Test parsing vivid done with apparently no errors in "+ (t2-(float)t1)/1000+" seconds");
|
77 |
} |
78 |
|
79 |
public void testParsingDescribeFeatureType2() { |
80 |
long t1 = System.currentTimeMillis(); |
81 |
assertTrue(handler.parseCapabilities(new File("testdata/wfs/WFS-1_1_0IDEEGetCapabilities.xml"))); |
82 |
handler.setCurrentFeature("ideewfs:VerticeRedOrdenInferior");
|
83 |
assertTrue(handler.parseDescribeFeatureType(new File("testdata/wfs/WFS-1_1_0IDEEDescribeFeatureType.xml"),null)); |
84 |
long t2 = System.currentTimeMillis(); |
85 |
Object obj = handler.getFeatures().get("ideewfs:VerticeRedOrdenInferior"); |
86 |
System.out.println("Test parsing vivid done with apparently no errors in "+ (t2-(float)t1)/1000+" seconds"); |
87 |
} |
88 |
|
89 |
public void testParsingDescribeFeatureTypeTNT() { |
90 |
long t1 = System.currentTimeMillis(); |
91 |
assertTrue(handler.parseCapabilities(new File("testdata/wfs/WFS-1_1_0TNTGetCapabilities.xml"))); |
92 |
handler.setCurrentFeature("BDLL200_Provincia");
|
93 |
assertTrue(handler.parseDescribeFeatureType(new File("testdata/wfs/WFS-1_1_0TNTDescribeFeatureType1.xml"),null)); |
94 |
assertTrue(handler.parseDescribeFeatureType(new File("testdata/wfs/WFS-1_1_0TNTDescribeFeatureType2.xml"),null)); |
95 |
long t2 = System.currentTimeMillis(); |
96 |
System.out.println("Test parsing IDEE done with apparently no errors in "+ (t2-(float)t1)/1000+" seconds"); |
97 |
} |
98 |
} |