9422
|
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde |
|
2 * Software engineering by |
|
3 * Björnsen Beratende Ingenieure GmbH |
|
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt |
|
5 * |
|
6 * This file is Free Software under the GNU AGPL (>=v3) |
|
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
|
8 * documentation coming with Dive4Elements River for details. |
|
9 */ |
|
10 package test.sinfo; |
|
11 |
9570
|
12 import java.io.File; |
9422
|
13 import java.io.IOException; |
|
14 import java.util.ArrayList; |
|
15 import java.util.List; |
|
16 |
|
17 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; |
|
18 import org.dive4elements.river.client.shared.exceptions.ServerException; |
|
19 |
|
20 import test.AbstractBerechnungsartenTester.River; |
|
21 import test.AbstractModuleRunner; |
|
22 import test.ICalcMode; |
|
23 import test.SimpleRecommendation; |
|
24 |
|
25 /** |
|
26 * @author Domenico Nardi Tironi |
|
27 * |
|
28 */ |
|
29 final class SinfoFlowdepthDevelopmentRunner extends AbstractModuleRunner { |
|
30 |
|
31 private final List<String> pairIdsCurrent = new ArrayList<String>(); |
|
32 private final List<String> pairIdsHistorical = new ArrayList<String>(); |
|
33 |
9570
|
34 public SinfoFlowdepthDevelopmentRunner(final File testFolder, final ICalcMode sinfoCalcFlowDepth, final double from, final double to, final River river) |
9567
|
35 throws ConnectionException, ServerException { |
9570
|
36 super(testFolder, AbstractModuleRunner.Infotype.sinfo, sinfoCalcFlowDepth, from, to, river); |
9422
|
37 |
|
38 } |
|
39 |
|
40 public void addCurrentRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException { |
|
41 this.pairIdsCurrent.add(super.getRecommendationPairString(rec1, rec2)); |
|
42 } |
|
43 |
|
44 public void addHistoricalRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException { |
|
45 this.pairIdsHistorical.add(super.getRecommendationPairString(rec1, rec2)); |
|
46 } |
|
47 |
|
48 @Override |
9567
|
49 public void runTest() throws ServerException, IOException { |
9422
|
50 /* Select River */ |
|
51 super.selectRiver(); |
|
52 |
|
53 /* Select ICalcMode */ |
|
54 super.selectCalcMode(); |
|
55 |
|
56 /* Select Range */ |
|
57 super.selectRange(); |
|
58 |
|
59 /* Select current Fixpunkte */ |
|
60 feedAndGo(super.extractPairData(this.pairIdsCurrent, "diffid_current"), 0); |
|
61 |
|
62 /* Select historical Fixpunkte */ |
|
63 feedAndGo(super.extractPairData(this.pairIdsHistorical, "diffid_historical"), 0); |
|
64 |
|
65 describeCollection(); |
|
66 |
9567
|
67 super.runTests(); |
9422
|
68 } |
|
69 } |