9422
|
1 package test.uinfo; |
|
2 |
|
3 import java.io.IOException; |
9428
|
4 import java.util.ArrayList; |
|
5 import java.util.List; |
9422
|
6 |
|
7 import org.dive4elements.river.client.shared.exceptions.ServerException; |
9428
|
8 import org.dive4elements.river.client.shared.model.SalixZone; |
9442
|
9 import org.junit.Ignore; |
9422
|
10 import org.junit.Test; |
|
11 |
|
12 import test.AbstractBerechnungsartenTester; |
|
13 import test.ICalcMode; |
|
14 import test.IFilenameMapper; |
|
15 |
9442
|
16 @Ignore |
9422
|
17 public class UInfoBerechnungsartenTester extends AbstractBerechnungsartenTester { |
|
18 |
|
19 public static enum CalcMode implements ICalcMode { |
|
20 uinfo_salix_line, // |
|
21 // der Vollständigkeit halber |
|
22 uinfo_inundation_duration, uinfo_vegetation_zones |
|
23 }; |
|
24 |
9424
|
25 // Szenarien: |
|
26 // scenarioType.option1 |
|
27 // scenarioType.option2 |
|
28 // scenarioType.option3 |
|
29 |
9422
|
30 public static enum FilenameMapper implements IFilenameMapper { |
|
31 |
9424
|
32 SALIX_NO_SCENARIO("/uinfo/salix/salix_no_scenario.csv"), // |
9428
|
33 SALIX_REGIONAL_SCENARIO("/uinfo/salix/salix_regional.csv"), // |
|
34 SALIX_SUPRAREGIONAL_SCENARIO("/uinfo/salix/salix_supraregional.csv"), // |
|
35 SALIX_HISTORICAL_SCENARIO("/uinfo/salix/salix_historical.csv"); // |
9422
|
36 private final String filename; |
|
37 |
|
38 FilenameMapper(final String filename) { |
|
39 this.filename = filename; |
|
40 } |
|
41 |
|
42 @Override |
|
43 public String getFilename() { |
|
44 return this.filename; |
|
45 } |
|
46 } |
|
47 |
|
48 /* Salix no Scenario */ |
|
49 @Test |
|
50 public void testSalixNoScenario() throws ServerException, IOException { |
9424
|
51 new UinfoSalixRunner(FilenameMapper.SALIX_NO_SCENARIO, 0., 182.4, River.Beispielfluss, null) |
9422
|
52 .runTest(overrideFileExport() != null ? overrideFileExport() : true); |
|
53 } |
|
54 |
9424
|
55 @Test |
|
56 public void testSalixRegionalScenario() throws ServerException, IOException { |
|
57 new UinfoSalixRegionalRunner(FilenameMapper.SALIX_REGIONAL_SCENARIO, 0., 182.4, River.Beispielfluss, "scenarioType.option1", 50., 60., "5 -10 12 0") |
|
58 .runTest(overrideFileExport() != null ? overrideFileExport() : true); |
|
59 } |
9428
|
60 |
|
61 @Test |
|
62 public void testSalixSupraregionalScenario() throws ServerException, IOException { |
|
63 final List<SalixZone> zones = new ArrayList<SalixZone>(); |
|
64 zones.add(SalixZone.createFromTableEntry("2", "0", "50")); |
|
65 zones.add(SalixZone.createFromTableEntry("5", "50", "100")); |
|
66 zones.add(SalixZone.createFromTableEntry("2", "100", "182.4")); |
|
67 new UinfoSalixSupraregionalRunner(FilenameMapper.SALIX_SUPRAREGIONAL_SCENARIO, 0., 182.4, River.Beispielfluss, "scenarioType.option2", zones) |
|
68 .runTest(overrideFileExport() != null ? overrideFileExport() : true); |
|
69 } |
|
70 |
|
71 @Test |
|
72 public void testSalixHistoricalScenario() throws ServerException, IOException { |
|
73 |
|
74 // name of sounding can be found in ParameterMatrixPanel.getData |
|
75 new UinfoSalixHistoricalRunner(FilenameMapper.SALIX_HISTORICAL_SCENARIO, 0., 182.4, River.Beispielfluss, "scenarioType.option3", "single-18", 149.6, |
|
76 182.4).runTest(overrideFileExport() != null ? overrideFileExport() : true); |
|
77 } |
9422
|
78 } |