[Schmitzm-commits] r947 - in trunk: src/schmitzm/geotools/styling src/schmitzm/swing src_junit/schmitzm/geotools src_junit/schmitzm/geotools/styling src_junit/schmitzm/jfree/feature/style

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jul 28 11:36:13 CEST 2010


Author: alfonx
Date: 2010-07-28 11:36:12 +0200 (Wed, 28 Jul 2010)
New Revision: 947

Added:
   trunk/src_junit/schmitzm/geotools/styling/
   trunk/src_junit/schmitzm/geotools/styling/TestingUtil2.java
Modified:
   trunk/src/schmitzm/geotools/styling/StylingUtilTest.java
   trunk/src/schmitzm/swing/TestingUtil.java
   trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java
Log:
Fixed the problem with test test class

Modified: trunk/src/schmitzm/geotools/styling/StylingUtilTest.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtilTest.java	2010-07-26 17:13:42 UTC (rev 946)
+++ trunk/src/schmitzm/geotools/styling/StylingUtilTest.java	2010-07-28 09:36:12 UTC (rev 947)
@@ -34,7 +34,7 @@
 	@Test
 	public void testSelectionStyles() throws Throwable {
 
-		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestingUtil
+		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestingUtil2
 				.getTestFeatures();
 		
 		JPanel jPanel = new JPanel();

Modified: trunk/src/schmitzm/swing/TestingUtil.java
===================================================================
--- trunk/src/schmitzm/swing/TestingUtil.java	2010-07-26 17:13:42 UTC (rev 946)
+++ trunk/src/schmitzm/swing/TestingUtil.java	2010-07-28 09:36:12 UTC (rev 947)
@@ -1,7 +1,5 @@
 package schmitzm.swing;
 
-import static org.junit.Assert.assertNotNull;
-
 import java.awt.GraphicsEnvironment;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -18,7 +16,7 @@
 import org.opengis.feature.simple.SimpleFeatureType;
 
 import schmitzm.geotools.io.GeoImportUtil;
-import schmitzm.jfree.feature.style.FeatureChartStyleTest;
+import schmitzm.jfree.feature.style.FeatureChartStyle;
 import schmitzm.lang.LangUtil;
 
 /**
@@ -75,29 +73,5 @@
 		testPanel(contentPane, contentPane.getClass().getSimpleName());
 	}
 
-	final static String resLocation = "/schmitzm/jfree/feature/style/testLineChartShape/testKreiseLineChart.shp";
 
-	/**
-	 * Stellt Test-Features zur Verfügung, WENN die Anwendung im maven scope
-	 * <code>test</code> läuft.
-	 */
-	public static FeatureCollection<SimpleFeatureType, SimpleFeature> getTestFeatures()
-			throws IOException {
-		// Testdatenshape einlesen
-		URL resourceUrl = FeatureChartStyleTest.class.getResource(resLocation);
-
-		if (resourceUrl == null)
-			throw new IllegalStateException(resLocation
-					+ " wurde nicht gefunden!");
-
-		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = GeoImportUtil
-				.readFeaturesFromShapeURL(resourceUrl);
-
-		if (testFeatures == null)
-			throw new IllegalStateException(
-					"Testfeatures konnten nicht gelesen werden");
-
-		return testFeatures;
-	}
-
 }

Added: trunk/src_junit/schmitzm/geotools/styling/TestingUtil2.java
===================================================================
--- trunk/src_junit/schmitzm/geotools/styling/TestingUtil2.java	2010-07-26 17:13:42 UTC (rev 946)
+++ trunk/src_junit/schmitzm/geotools/styling/TestingUtil2.java	2010-07-28 09:36:12 UTC (rev 947)
@@ -0,0 +1,39 @@
+package schmitzm.geotools.styling;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.geotools.feature.FeatureCollection;
+import org.opengis.feature.simple.SimpleFeature;
+import org.opengis.feature.simple.SimpleFeatureType;
+
+import schmitzm.geotools.io.GeoImportUtil;
+import schmitzm.jfree.feature.style.FeatureChartStyle;
+
+public class TestingUtil2 {
+
+	final static String resLocation = "/schmitzm/jfree/feature/style/testLineChartShape/testKreiseLineChart.shp";
+
+	/**
+	 * Stellt Test-Features zur Verfügung, WENN die Anwendung im maven scope
+	 * <code>test</code> läuft.
+	 */
+	public static FeatureCollection<SimpleFeatureType, SimpleFeature> getTestFeatures()
+			throws IOException {
+		// Testdatenshape einlesen
+		URL resourceUrl = FeatureChartStyle.class.getResource(resLocation);
+
+		if (resourceUrl == null)
+			throw new IllegalStateException(resLocation
+					+ " wurde nicht gefunden!");
+
+		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = GeoImportUtil
+				.readFeaturesFromShapeURL(resourceUrl);
+
+		if (testFeatures == null)
+			throw new IllegalStateException(
+					"Testfeatures konnten nicht gelesen werden");
+
+		return testFeatures;
+	}
+}


Property changes on: trunk/src_junit/schmitzm/geotools/styling/TestingUtil2.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id URL
Name: svn:eol-style
   + native

Modified: trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java
===================================================================
--- trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java	2010-07-26 17:13:42 UTC (rev 946)
+++ trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java	2010-07-28 09:36:12 UTC (rev 947)
@@ -12,7 +12,6 @@
 import java.awt.image.BufferedImage;
 import java.io.File;
 import java.io.IOException;
-import java.net.URL;
 import java.text.NumberFormat;
 import java.util.ArrayList;
 import java.util.List;
@@ -34,14 +33,13 @@
 import org.opengis.feature.simple.SimpleFeature;
 import org.opengis.feature.simple.SimpleFeatureType;
 
-import schmitzm.geotools.io.GeoImportUtil;
+import schmitzm.geotools.styling.TestingUtil2;
 import schmitzm.io.IOUtil;
 import schmitzm.jfree.chart.style.ChartAxisStyle;
 import schmitzm.jfree.chart.style.ChartLabelStyle;
 import schmitzm.jfree.chart.style.ChartRendererStyle;
 import schmitzm.jfree.chart.style.ChartType;
 import schmitzm.jfree.table.AggregationFunction;
-import schmitzm.swing.TestingUtil;
 
 public class FeatureChartStyleTest {
 	private static Logger log = Logger.getLogger(FeatureChartStyleTest.class);
@@ -59,7 +57,7 @@
 	public void testBarChartSortedSeries() throws IOException,
 			InterruptedException {
 
-		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestingUtil
+		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestingUtil2
 				.getTestFeatures();
 
 		// Daten auf korrektheit überprüfen
@@ -168,7 +166,7 @@
 			InterruptedException {
 
 		// Testdatenshape einlesen
-		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestingUtil
+		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestingUtil2
 				.getTestFeatures();
 
 		// Daten auf korrektheit überprüfen
@@ -245,7 +243,7 @@
 	public void testLineChartAsCategories() throws IOException, CQLException,
 			InterruptedException {
 
-		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestingUtil
+		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestingUtil2
 				.getTestFeatures();
 
 		// Daten auf korrektheit überprüfen
@@ -370,7 +368,7 @@
 	public void testLineChartNOTCategories() throws IOException, CQLException,
 			InterruptedException {
 
-		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestingUtil
+		FeatureCollection<SimpleFeatureType, SimpleFeature> testFeatures = TestingUtil2
 				.getTestFeatures();
 
 		// Daten auf korrektheit überprüfen



More information about the Schmitzm-commits mailing list