9439
|
1 package test.bundu; |
|
2 |
|
3 import java.io.IOException; |
|
4 import java.util.ArrayList; |
|
5 import java.util.List; |
|
6 |
|
7 import org.dive4elements.river.client.shared.exceptions.ServerException; |
|
8 import org.junit.Test; |
|
9 |
|
10 import test.AbstractBerechnungsartenTester; |
|
11 import test.ICalcMode; |
|
12 import test.IFilenameMapper; |
|
13 |
|
14 //@Ignore |
|
15 public class BunduBerechnungsartenTester extends AbstractBerechnungsartenTester { |
|
16 |
|
17 public static enum CalcMode implements ICalcMode { |
|
18 bundu_bezugswst, // |
|
19 // der Vollständigkeit halber |
|
20 bundu_analysis, bundu_vollmer |
|
21 }; |
|
22 |
|
23 public static enum FilenameMapper implements IFilenameMapper { |
|
24 BEZUGSWST_FILE("/bundu/bezugswst/bezugswst.csv"); // |
|
25 private final String filename; |
|
26 |
|
27 FilenameMapper(final String filename) { |
|
28 this.filename = filename; |
|
29 } |
|
30 |
|
31 @Override |
|
32 public String getFilename() { |
|
33 return this.filename; |
|
34 } |
|
35 } |
|
36 |
|
37 // FixChoice |
|
38 // "state.bundu.wst.fix.auto" |
|
39 // state.bundu.wst.fix.manual; |
|
40 |
|
41 // CalcChoice: |
|
42 // state.bundu.wst.calc.manual |
|
43 // state.bundu.wst.calc.auto |
|
44 |
|
45 // SOUNDINGS: SIehe ParameterMatrixPanel.getData |
|
46 |
|
47 @Test |
|
48 public void testBezugswstAuto() throws ServerException, IOException { |
|
49 final List<Segment> segments = new ArrayList<Segment>(); |
|
50 segments.add(new Segment("Köln", 670., 703.3, 1090.)); |
|
51 segments.add(new Segment("Düsseldorf", 703.3, 710., 1060.)); |
|
52 |
|
53 final int abflussklasseFrom = 0; |
|
54 final int abflussklasseTo = 3; // TODO: Make map here |
|
55 |
|
56 final int[] events = new int[] { 1465, 1466, 1452, 1453, 1472, 1473, 1478, 1479, 1604, 1605, 1317, 1318, 1353, 1354, 1596, 1597, 1323, 1324, 1345, 1346, |
|
57 1330, 1331, 1458, 1459 }; // get ids by debugging FixCalculation line 73 (constructor) |
|
58 |
|
59 new BunduBezugswstRunner(FilenameMapper.BEZUGSWST_FILE, 670., 710., 100, River.Rhein, 2015, "state.bundu.wst.fix.auto", abflussklasseFrom, |
|
60 abflussklasseTo, events, 10, segments, "state.bundu.wst.calc.auto", false, "single-95") |
|
61 .runTest(overrideFileExport() != null ? overrideFileExport() : true); |
|
62 } |
|
63 } |