01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2004-2006, Geotools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.data.wms.test;
17:
18: import java.io.InputStream;
19: import java.net.URL;
20:
21: import org.geotools.data.ows.WMSCapabilities;
22: import org.geotools.wms.v1_1_1.bindings.WMSV1_1_1Configuration;
23: import org.geotools.xml.Parser;
24:
25: import junit.framework.TestCase;
26:
27: public class StreamingParserWMSV1_1_1OnlineTest extends TestCase {
28:
29: public void testStreamingWMSV1_1_1Configuration() throws Exception {
30: URL server = new URL(
31: "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?VERSION=1.1.0&REQUEST=GetCapabilities&SERVICE=WMS");
32: InputStream capInput = server.openStream();
33:
34: Parser p = new Parser(new WMSV1_1_1Configuration());
35: Object o = p.parse(capInput);
36:
37: assertTrue(o instanceof WMSCapabilities);
38:
39: }
40:
41: }
|