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 |
|
14 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; |
|
15 import org.dive4elements.river.client.shared.exceptions.ServerException; |
|
16 import org.dive4elements.river.client.shared.model.Data; |
|
17 import org.dive4elements.river.client.shared.model.DataItem; |
|
18 import org.dive4elements.river.client.shared.model.DefaultDataItem; |
|
19 import org.dive4elements.river.client.shared.model.StringOptionsData; |
|
20 |
|
21 import test.AbstractBerechnungsartenTester.River; |
|
22 import test.AbstractModuleRunner; |
|
23 import test.ICalcMode; |
|
24 import test.WQInputHelper; |
|
25 |
|
26 /** |
|
27 * @author Domenico Nardi Tironi |
|
28 * |
|
29 */ |
|
30 final class SinfoTkhRunner extends AbstractModuleRunner { |
|
31 |
|
32 private final double[] wasserspiegellage; |
|
33 |
9567
|
34 public SinfoTkhRunner(final ICalcMode sinfoCalcFlowDepth, final double from, final double to, final River river, final double[] wasserspiegellage) |
|
35 throws ConnectionException, ServerException { |
|
36 super(AbstractModuleRunner.Infotype.sinfo, sinfoCalcFlowDepth, from, to, river); |
9422
|
37 this.wasserspiegellage = wasserspiegellage; |
|
38 } |
|
39 |
|
40 @Override |
9567
|
41 public void runTest() throws ServerException, IOException { |
9422
|
42 /* Select River */ |
|
43 super.selectRiver(); |
|
44 |
|
45 /* Select ICalcMode */ |
|
46 super.selectCalcMode(); |
|
47 |
|
48 super.feed(new Data[] { |
|
49 new StringOptionsData("ld_mode", "ld_mode", new DataItem[] { new DefaultDataItem("distance_only", "distance_only", "distance_only") }) }); // leider |
|
50 // wichtig |
|
51 // :-( |
|
52 |
|
53 /* Select Range */ |
|
54 super.selectRange(); |
|
55 |
|
56 final WQInputHelper helper = new WQInputHelper(this.wasserspiegellage); |
|
57 super.feedAndGo(helper.getDataforFeed(), // |
|
58 0);// reachable state index |
|
59 |
|
60 describeCollection(); |
|
61 |
9567
|
62 super.runTests(); |
9422
|
63 } |
|
64 } |