Mercurial > dive4elements > river
annotate gwt-client/src/test/java/test/SinfoFlowdepthRunner.java @ 9194:c373909fb7ca
Fixed: used java 7 feature although java 6 comliance level is configured
author | gernotbelger |
---|---|
date | Fri, 29 Jun 2018 13:09:29 +0200 |
parents | 48d87af1243e |
children |
rev | line source |
---|---|
9127 | 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; | |
11 | |
12 import java.io.IOException; | |
9148 | 13 import java.util.ArrayList; |
9127 | 14 |
15 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; | |
16 import org.dive4elements.river.client.shared.exceptions.ServerException; | |
17 import org.dive4elements.river.client.shared.model.Data; | |
18 import org.dive4elements.river.client.shared.model.DataItem; | |
19 import org.dive4elements.river.client.shared.model.DefaultDataItem; | |
20 import org.dive4elements.river.client.shared.model.StringOptionsData; | |
21 | |
22 import test.BerechnungsartenTester.CalcMode; | |
23 import test.BerechnungsartenTester.FilenameMapper; | |
24 import test.BerechnungsartenTester.River; | |
25 | |
26 /** | |
27 * @author Domenico Nardi Tironi | |
28 * | |
29 */ | |
9148 | 30 public class SinfoFlowdepthRunner extends AbstractModuleRunner { |
9127 | 31 |
32 private final boolean useTkh; | |
9148 | 33 private final ArrayList<String> pairIds = new ArrayList<String>(); |
9127 | 34 |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
35 public SinfoFlowdepthRunner(final String username, final String password, final CalcMode sinfoCalcFlowDepth, final FilenameMapper file, final double from, |
9127 | 36 final double to, final River river, final boolean useTkh) throws ConnectionException, ServerException { |
9148 | 37 super(username, password, AbstractModuleRunner.Infotype.sinfo, sinfoCalcFlowDepth, file, from, to, river); |
9127 | 38 this.useTkh = useTkh; |
39 } | |
40 | |
9148 | 41 public void addRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException { |
42 this.pairIds.add(super.getRecommendationPairString(rec1, rec2)); | |
43 } | |
44 | |
9127 | 45 @Override |
46 public void runTest(final boolean exportToFile) throws ServerException, IOException { | |
47 /* Select River */ | |
48 super.selectRiver(); | |
49 | |
50 /* Select CalcMode */ | |
51 super.selectCalcMode(); | |
52 | |
53 /* Select Range */ | |
54 super.selectRange(); | |
55 | |
56 /* Select Fixpunkte */ | |
9148 | 57 feedAndGo(extractPairData(this.pairIds, "diffids"), 0); |
9127 | 58 |
59 /* Select TRANSPORTKÖRPERHÖHHEN - einziger Unterschied zu FlowdepthMinMax */ | |
60 final String useTkhStr = String.valueOf(this.useTkh); | |
61 feedAndGo(new Data[] { new StringOptionsData("use_transport_bodies", "use_transport_bodies", | |
62 new DataItem[] { new DefaultDataItem(useTkhStr, useTkhStr, useTkhStr) }) }, 0); | |
63 | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
64 describeCollection(); |
9127 | 65 |
66 super.export(exportToFile); | |
67 } | |
68 } |