From: <jma...@sv...> - 2004-05-24 21:27:26
|
Author: jmacgill Date: 2004-05-24 14:27:26 -0700 (Mon, 24 May 2004) New Revision: 6111 Added: geotools/trunk/gt/module/main/test/org/geotools/styling/test-data/ Removed: geotools/trunk/gt/module/main/test/org/geotools/styling/testData/ Modified: geotools/trunk/gt/module/main/test/org/geotools/styling/SLDStyleTest.j= ava geotools/trunk/gt/module/main/test/org/geotools/styling/XMLEncoderTest= .java Log: updated tests to use TestData support class moved testData to test-data to meet new standard Modified: geotools/trunk/gt/module/main/test/org/geotools/styling/SLDStyl= eTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- geotools/trunk/gt/module/main/test/org/geotools/styling/SLDStyleTest.= java 2004-05-24 21:26:10 UTC (rev 6110) +++ geotools/trunk/gt/module/main/test/org/geotools/styling/SLDStyleTest.= java 2004-05-24 21:27:26 UTC (rev 6111) @@ -15,6 +15,7 @@ import java.io.File; import java.util.ArrayList; import java.util.logging.Level; +import org.geotools.resources.TestData; =20 /** * @@ -65,10 +66,12 @@ =20 /** Test of parseStyle method, of class org.geotools.styling.SLDStyl= e. */ public void testParseStyle() throws Exception{ - java.net.URL base =3D getClass().getResource("testData/"); - =20 + //java.net.URL base =3D getClass().getResource("testData/"); + // base =3D getClass().getResource("testData"); + // base =3D getClass().getResource("/testData"); StyleFactory factory =3D StyleFactory.createStyleFactory(); - java.net.URL surl =3D new java.net.URL(base + "/test-sld.xml"); + //java.net.URL surl =3D new java.net.URL(base + "/test-sld.xml")= ; + java.net.URL surl =3D TestData.getResource(this, "test-sld.xml")= ; SLDStyle stylereader =3D new SLDStyle(factory, surl); StyledLayerDescriptor sld =3D stylereader.parseSLD(); assertEquals("My Layer", sld.getName()); Modified: geotools/trunk/gt/module/main/test/org/geotools/styling/XMLEnco= derTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- geotools/trunk/gt/module/main/test/org/geotools/styling/XMLEncoderTes= t.java 2004-05-24 21:26:10 UTC (rev 6110) +++ geotools/trunk/gt/module/main/test/org/geotools/styling/XMLEncoderTes= t.java 2004-05-24 21:27:26 UTC (rev 6111) @@ -12,6 +12,7 @@ import java.io.Writer; import java.util.logging.Logger; import junit.framework.*; +import org.geotools.resources.TestData; =20 /** * @@ -38,9 +39,10 @@ // public void testHello() {} =20 public void testSimpleEncoder() throws Exception{ - java.net.URL base =3D getClass().getResource("testData/"); + StyleFactory factory =3D StyleFactory.createStyleFactory(); - java.net.URL surl =3D new java.net.URL(base + "markTest.sld"); + =20 + java.net.URL surl =3D TestData.getResource(this, "markTest.sld")= ; LOGGER.info("reading "+surl); SLDStyle stylereader =3D new SLDStyle(factory,surl); Style[] style =3D stylereader.readXML(); @@ -58,9 +60,10 @@ =20 } public void testComplexEncoder() throws Exception{ - java.net.URL base =3D getClass().getResource("testData/"); + =20 StyleFactory factory =3D StyleFactory.createStyleFactory(); - java.net.URL surl =3D new java.net.URL(base + "sample.sld"); + =20 + java.net.URL surl =3D TestData.getResource(this, "sample.sld"); LOGGER.info("reading "+surl); SLDStyle stylereader =3D new SLDStyle(factory,surl); Style[] style =3D stylereader.readXML(); @@ -72,9 +75,9 @@ =20 } public void testComplexTextEncoder() throws Exception{ - java.net.URL base =3D getClass().getResource("testData/"); StyleFactory factory =3D StyleFactory.createStyleFactory(); - java.net.URL surl =3D new java.net.URL(base + "textTest.sld"); + java.net.URL surl =3D TestData.getResource(this, "textTest.sld")= ; + =20 LOGGER.info("reading "+surl); SLDStyle stylereader =3D new SLDStyle(factory,surl); Style[] style =3D stylereader.readXML(); Copied: geotools/trunk/gt/module/main/test/org/geotools/styling/test-data= (from rev 6105, geotools/trunk/gt/module/main/test/org/geotools/styling/= testData) |