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