Mercurial > dive4elements > river
view gwt-client/src/test/java/test/uinfo/UInfoBerechnungsartenTester.java @ 9656:31549fdfaf4f
Importer (s/u-info) extensions: flow-depth: uniform formatting of from-to series names,
warning instead of cancelling in case of missing column values,
detecting, logging and skipping columns with wrong unit,
better counting of inserted/updated values for each column
author | mschaefer |
---|---|
date | Mon, 23 Mar 2020 15:21:39 +0100 |
parents | 531a60b7af95 |
children |
line wrap: on
line source
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.FilenameSupplier; import test.ICalcMode; public class UInfoBerechnungsartenTester extends AbstractBerechnungsartenTester { private final String UINFO_SALIX_MAIN_EXPORT_MODE_NAME = "uinfo_salix_line_export"; private final String UINFO_SALIX_LAENGS_CHART_NAME = "uinfo_salix_line"; public static enum CalcMode implements ICalcMode { uinfo_salix_line, // // der Vollständigkeit halber uinfo_inundation_duration, uinfo_vegetation_zones }; // Szenarien: // scenarioType.option1 // scenarioType.option2 // scenarioType.option3 /* * HELLO WORLD FILES: * FilenameSupplier SALIX_NO_SCENARIO = new FilenameSupplier("/uinfo/salix/salix_no_scenario.csv"); // * FilenameSupplier SALIX_REGIONAL_SCENARIO = new FilenameSupplier("/uinfo/salix/salix_regional.csv"); // * FilenameSupplier SALIX_SUPRAREGIONAL_SCENARIO = new FilenameSupplier("/uinfo/salix/salix_supraregional.csv"); // * FilenameSupplier SALIX_HISTORICAL_SCENARIO = new FilenameSupplier("/uinfo/salix/salix_historical.csv"); // */ FilenameSupplier SALIX_01 = new FilenameSupplier("/uinfo/salix/uinfo_salix_01.csv"); // FilenameSupplier SALIX_02 = new FilenameSupplier("/uinfo/salix/uinfo_salix_02.csv"); // FilenameSupplier SALIX_02_CHART = new FilenameSupplier("/uinfo/salix/uinfo_salix_02_chart_laengs.csv"); // FilenameSupplier SALIX_03 = new FilenameSupplier("/uinfo/salix/uinfo_salix_03.csv"); // FilenameSupplier SALIX_03_CHART = new FilenameSupplier("/uinfo/salix/uinfo_salix_03_chart_laengs.csv"); // FilenameSupplier SALIX_04 = new FilenameSupplier("/uinfo/salix/uinfo_salix_04.csv"); // @Test public void test01() throws ServerException, IOException { new UinfoSalixRunner(super.testFolder, 336.2, 866.3, River.Rhein, null) // .addOutputTest(this.SALIX_01, this.UINFO_SALIX_MAIN_EXPORT_MODE_NAME, null) // .runTest(); // this.SALIX_NO_SCENARIO } @Test public void test02() throws ServerException, IOException { new UinfoSalixRegionalRunner(super.testFolder, 336.2, 866.3, River.Rhein, "scenarioType.option1", 336.2, 866.3, "-50 50")// .addOutputTest(this.SALIX_02, this.UINFO_SALIX_MAIN_EXPORT_MODE_NAME, null) // .addOutputTest(this.SALIX_02_CHART, this.UINFO_SALIX_LAENGS_CHART_NAME, null) // .runTest(); // this.SALIX_REGIONAL_SCENARIO, } @Test public void test03() throws ServerException, IOException { final List<SalixZone> zones = new ArrayList<SalixZone>(); zones.add(SalixZone.createFromTableEntry("0", "0", "100")); zones.add(SalixZone.createFromTableEntry("-50", "100", "200")); zones.add(SalixZone.createFromTableEntry("0", "200", "300")); zones.add(SalixZone.createFromTableEntry("30", "300", "450")); zones.add(SalixZone.createFromTableEntry("0", "450", "550")); new UinfoSalixSupraregionalRunner(super.testFolder, 0., 550.0, River.Elbe, "scenarioType.option2", zones) .addOutputTest(this.SALIX_03, this.UINFO_SALIX_MAIN_EXPORT_MODE_NAME, null) // .addOutputTest(this.SALIX_03_CHART, this.UINFO_SALIX_LAENGS_CHART_NAME, null) // .runTest(); // this.SALIX_SUPRAREGIONAL_SCENARIO, } @Test public void test04() throws ServerException, IOException { // name of sounding can be found in ParameterMatrixPanel.getData new UinfoSalixHistoricalRunner(super.testFolder, 0., 598.3, River.Elbe, "scenarioType.option3", "single-68", 0.1, 585.3) .addOutputTest(this.SALIX_04, this.UINFO_SALIX_MAIN_EXPORT_MODE_NAME, null) // .runTest(); // this.SALIX_HISTORICAL_SCENARIO, } /* * HELLO * WORLD (below) */ /* * /* Salix no Scenario */ /* * // @Test * public void testSalixNoScenario() throws ServerException, IOException { * new UinfoSalixRunner(0., 182.4, River.Beispielfluss, null) // * .addOutputTest(this.SALIX_NO_SCENARIO, this.UINFO_SALIX_MAIN_EXPORT_MODE_NAME, null) // * .runTest(); * // this.SALIX_NO_SCENARIO * } * // @Test * public void testSalixRegionalScenario() throws ServerException, IOException { * new UinfoSalixRegionalRunner(0., 182.4, River.Beispielfluss, "scenarioType.option1", 50., 60., "5 -10 12 0") * .addOutputTest(this.SALIX_REGIONAL_SCENARIO, this.UINFO_SALIX_MAIN_EXPORT_MODE_NAME, null) // * .runTest(); * // this.SALIX_REGIONAL_SCENARIO, * } * // @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(0., 182.4, River.Beispielfluss, "scenarioType.option2", zones) * .addOutputTest(this.SALIX_SUPRAREGIONAL_SCENARIO, this.UINFO_SALIX_MAIN_EXPORT_MODE_NAME, null) // * .runTest(); * // this.SALIX_SUPRAREGIONAL_SCENARIO, * } * // @Test * public void testSalixHistoricalScenario() throws ServerException, IOException { * // name of sounding can be found in ParameterMatrixPanel.getData * new UinfoSalixHistoricalRunner(0., 182.4, River.Beispielfluss, "scenarioType.option3", "single-18", 149.6, 182.4) * .addOutputTest(this.SALIX_HISTORICAL_SCENARIO, this.UINFO_SALIX_MAIN_EXPORT_MODE_NAME, null) // * .runTest(); * // this.SALIX_HISTORICAL_SCENARIO, * } */ }