Mercurial > dive4elements > river
view gwt-client/src/test/java/test/uinfo/UInfoBerechnungsartenTester.java @ 9455:5f81d3f7b82b
pdf export disabled flag
author | gernotbelger |
---|---|
date | Thu, 23 Aug 2018 16:32:53 +0200 |
parents | 173f188569c6 |
children | 86e522bc7f36 |
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.Ignore; import org.junit.Test; import test.AbstractBerechnungsartenTester; import test.ICalcMode; import test.IFilenameMapper; @Ignore public class UInfoBerechnungsartenTester extends AbstractBerechnungsartenTester { 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 public static enum FilenameMapper implements IFilenameMapper { SALIX_NO_SCENARIO("/uinfo/salix/salix_no_scenario.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) { this.filename = filename; } @Override public String getFilename() { return this.filename; } } /* Salix no Scenario */ @Test public void testSalixNoScenario() throws ServerException, IOException { new UinfoSalixRunner(FilenameMapper.SALIX_NO_SCENARIO, 0., 182.4, River.Beispielfluss, null) .runTest(overrideFileExport() != null ? overrideFileExport() : true); } @Test public void testSalixRegionalScenario() throws ServerException, IOException { 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); } }