diff gwt-client/src/test/java/test/uinfo/UInfoBerechnungsartenTester.java @ 9428:15f274e6d83b

jUnit salix historical+supraregional
author gernotbelger
date Fri, 17 Aug 2018 17:40:59 +0200
parents da19f1f58d72
children 173f188569c6
line wrap: on
line diff
--- a/gwt-client/src/test/java/test/uinfo/UInfoBerechnungsartenTester.java	Fri Aug 17 16:48:24 2018 +0200
+++ b/gwt-client/src/test/java/test/uinfo/UInfoBerechnungsartenTester.java	Fri Aug 17 17:40:59 2018 +0200
@@ -1,22 +1,18 @@
 package test.uinfo;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.dive4elements.river.client.shared.exceptions.ServerException;
+import org.dive4elements.river.client.shared.model.SalixZone;
 import org.junit.Test;
 
 import test.AbstractBerechnungsartenTester;
 import test.ICalcMode;
 import test.IFilenameMapper;
 
-/**
- * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
- */
-
-// REMARK: ignored, because maven will auto-test all tests, but this one needs a running river-artifacts
-// For running the JUunit test, the annotation @Ignore has to be disabled
- import org.junit.Ignore;
- @Ignore
+//@Ignore
 public class UInfoBerechnungsartenTester extends AbstractBerechnungsartenTester {
 
     public static enum CalcMode implements ICalcMode {
@@ -33,8 +29,9 @@
     public static enum FilenameMapper implements IFilenameMapper {
 
         SALIX_NO_SCENARIO("/uinfo/salix/salix_no_scenario.csv"), //
-        SALIX_REGIONAL_SCENARIO("/uinfo/salix/salix_regional.csv"); //
-
+        SALIX_REGIONAL_SCENARIO("/uinfo/salix/salix_regional.csv"), //
+        SALIX_SUPRAREGIONAL_SCENARIO("/uinfo/salix/salix_supraregional.csv"), //
+        SALIX_HISTORICAL_SCENARIO("/uinfo/salix/salix_historical.csv"); //
         private final String filename;
 
         FilenameMapper(final String filename) {
@@ -59,4 +56,22 @@
         new UinfoSalixRegionalRunner(FilenameMapper.SALIX_REGIONAL_SCENARIO, 0., 182.4, River.Beispielfluss, "scenarioType.option1", 50., 60., "5 -10 12 0")
                 .runTest(overrideFileExport() != null ? overrideFileExport() : true);
     }
+
+    @Test
+    public void testSalixSupraregionalScenario() throws ServerException, IOException {
+        final List<SalixZone> zones = new ArrayList<SalixZone>();
+        zones.add(SalixZone.createFromTableEntry("2", "0", "50"));
+        zones.add(SalixZone.createFromTableEntry("5", "50", "100"));
+        zones.add(SalixZone.createFromTableEntry("2", "100", "182.4"));
+        new UinfoSalixSupraregionalRunner(FilenameMapper.SALIX_SUPRAREGIONAL_SCENARIO, 0., 182.4, River.Beispielfluss, "scenarioType.option2", zones)
+                .runTest(overrideFileExport() != null ? overrideFileExport() : true);
+    }
+
+    @Test
+    public void testSalixHistoricalScenario() throws ServerException, IOException {
+
+        // name of sounding can be found in ParameterMatrixPanel.getData
+        new UinfoSalixHistoricalRunner(FilenameMapper.SALIX_HISTORICAL_SCENARIO, 0., 182.4, River.Beispielfluss, "scenarioType.option3", "single-18", 149.6,
+                182.4).runTest(overrideFileExport() != null ? overrideFileExport() : true);
+    }
 }
\ No newline at end of file

http://dive4elements.wald.intevation.org