Mercurial > dive4elements > river
comparison gwt-client/src/test/java/test/uinfo/UInfoBerechnungsartenTester.java @ 9424:da19f1f58d72
jUnit test uinfo salix regional
author | gernotbelger |
---|---|
date | Fri, 17 Aug 2018 14:29:05 +0200 |
parents | e567fac95e3d |
children | 15f274e6d83b |
comparison
equal
deleted
inserted
replaced
9423:a299f32e4a71 | 9424:da19f1f58d72 |
---|---|
1 package test.uinfo; | 1 package test.uinfo; |
2 | 2 |
3 import java.io.IOException; | 3 import java.io.IOException; |
4 | 4 |
5 import org.dive4elements.river.client.shared.exceptions.ServerException; | 5 import org.dive4elements.river.client.shared.exceptions.ServerException; |
6 import org.junit.Ignore; | |
7 import org.junit.Test; | 6 import org.junit.Test; |
8 | 7 |
9 import test.AbstractBerechnungsartenTester; | 8 import test.AbstractBerechnungsartenTester; |
10 import test.ICalcMode; | 9 import test.ICalcMode; |
11 import test.IFilenameMapper; | 10 import test.IFilenameMapper; |
14 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 13 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
15 */ | 14 */ |
16 | 15 |
17 // REMARK: ignored, because maven will auto-test all tests, but this one needs a running river-artifacts | 16 // REMARK: ignored, because maven will auto-test all tests, but this one needs a running river-artifacts |
18 // For running the JUunit test, the annotation @Ignore has to be disabled | 17 // For running the JUunit test, the annotation @Ignore has to be disabled |
19 @Ignore | 18 import org.junit.Ignore; |
19 @Ignore | |
20 public class UInfoBerechnungsartenTester extends AbstractBerechnungsartenTester { | 20 public class UInfoBerechnungsartenTester extends AbstractBerechnungsartenTester { |
21 | 21 |
22 public static enum CalcMode implements ICalcMode { | 22 public static enum CalcMode implements ICalcMode { |
23 uinfo_salix_line, // | 23 uinfo_salix_line, // |
24 // der Vollständigkeit halber | 24 // der Vollständigkeit halber |
25 uinfo_inundation_duration, uinfo_vegetation_zones | 25 uinfo_inundation_duration, uinfo_vegetation_zones |
26 }; | 26 }; |
27 | 27 |
28 // Szenarien: | |
29 // scenarioType.option1 | |
30 // scenarioType.option2 | |
31 // scenarioType.option3 | |
32 | |
28 public static enum FilenameMapper implements IFilenameMapper { | 33 public static enum FilenameMapper implements IFilenameMapper { |
29 | 34 |
30 SALIX_NO_SCENARIO("/uinfo/salix/salix_no_scenario.csv"); // | 35 SALIX_NO_SCENARIO("/uinfo/salix/salix_no_scenario.csv"), // |
36 SALIX_REGIONAL_SCENARIO("/uinfo/salix/salix_regional.csv"); // | |
31 | 37 |
32 private final String filename; | 38 private final String filename; |
33 | 39 |
34 FilenameMapper(final String filename) { | 40 FilenameMapper(final String filename) { |
35 this.filename = filename; | 41 this.filename = filename; |
40 return this.filename; | 46 return this.filename; |
41 } | 47 } |
42 } | 48 } |
43 | 49 |
44 /* Salix no Scenario */ | 50 /* Salix no Scenario */ |
45 @Override | |
46 @Test | 51 @Test |
47 public void testSalixNoScenario() throws ServerException, IOException { | 52 public void testSalixNoScenario() throws ServerException, IOException { |
48 | 53 new UinfoSalixRunner(FilenameMapper.SALIX_NO_SCENARIO, 0., 182.4, River.Beispielfluss, null) |
49 UinfoRunnerCreatorHelper.createUinfoSalixTest(FilenameMapper.SALIX_NO_SCENARIO, 0., 182.4, River.Beispielfluss, null) | |
50 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | 54 .runTest(overrideFileExport() != null ? overrideFileExport() : true); |
51 } | 55 } |
52 | 56 |
57 @Test | |
58 public void testSalixRegionalScenario() throws ServerException, IOException { | |
59 new UinfoSalixRegionalRunner(FilenameMapper.SALIX_REGIONAL_SCENARIO, 0., 182.4, River.Beispielfluss, "scenarioType.option1", 50., 60., "5 -10 12 0") | |
60 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
61 } | |
53 } | 62 } |