Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libRemoteServices / test / org / gvsig / remoteClient / wfs / wfs_1_1_0 / WFSProtocolHandlerTest1_1_0.java @ 15554

History | View | Annotate | Download (3.47 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

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