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 |
|
12 import java.io.IOException; |
|
13 import java.util.ArrayList; |
|
14 import java.util.List; |
|
15 |
|
16 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; |
|
17 import org.dive4elements.river.client.shared.exceptions.ServerException; |
|
18 |
|
19 import test.AbstractBerechnungsartenTester.River; |
|
20 import test.AbstractModuleRunner; |
|
21 import test.ICalcMode; |
|
22 import test.SimpleRecommendation; |
|
23 |
|
24 /** |
|
25 * @author Domenico Nardi Tironi |
|
26 * |
|
27 */ |
|
28 final class SinfoFlowdepthDevelopmentRunner extends AbstractModuleRunner { |
|
29 |
|
30 private final List<String> pairIdsCurrent = new ArrayList<String>(); |
|
31 private final List<String> pairIdsHistorical = new ArrayList<String>(); |
|
32 |
9567
|
33 public SinfoFlowdepthDevelopmentRunner(final ICalcMode sinfoCalcFlowDepth, final double from, final double to, final River river) |
|
34 throws ConnectionException, ServerException { |
|
35 super(AbstractModuleRunner.Infotype.sinfo, sinfoCalcFlowDepth, from, to, river); |
9422
|
36 |
|
37 } |
|
38 |
|
39 public void addCurrentRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException { |
|
40 this.pairIdsCurrent.add(super.getRecommendationPairString(rec1, rec2)); |
|
41 } |
|
42 |
|
43 public void addHistoricalRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException { |
|
44 this.pairIdsHistorical.add(super.getRecommendationPairString(rec1, rec2)); |
|
45 } |
|
46 |
|
47 @Override |
9567
|
48 public void runTest() throws ServerException, IOException { |
9422
|
49 /* Select River */ |
|
50 super.selectRiver(); |
|
51 |
|
52 /* Select ICalcMode */ |
|
53 super.selectCalcMode(); |
|
54 |
|
55 /* Select Range */ |
|
56 super.selectRange(); |
|
57 |
|
58 /* Select current Fixpunkte */ |
|
59 feedAndGo(super.extractPairData(this.pairIdsCurrent, "diffid_current"), 0); |
|
60 |
|
61 /* Select historical Fixpunkte */ |
|
62 feedAndGo(super.extractPairData(this.pairIdsHistorical, "diffid_historical"), 0); |
|
63 |
|
64 describeCollection(); |
|
65 |
9567
|
66 super.runTests(); |
9422
|
67 } |
|
68 } |