Mercurial > dive4elements > river
comparison gwt-client/src/test/java/test/SinfoFlowdepthDevelopmentRunner.java @ 9148:48d87af1243e
Unit testing flowdepthdevelopment added
author | gernotbelger |
---|---|
date | Tue, 12 Jun 2018 15:04:40 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9147:28fe5e654495 | 9148:48d87af1243e |
---|---|
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; | |
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.BerechnungsartenTester.CalcMode; | |
20 import test.BerechnungsartenTester.FilenameMapper; | |
21 import test.BerechnungsartenTester.River; | |
22 | |
23 /** | |
24 * @author Domenico Nardi Tironi | |
25 * | |
26 */ | |
27 public class SinfoFlowdepthDevelopmentRunner extends AbstractModuleRunner { | |
28 | |
29 private final List<String> pairIdsCurrent = new ArrayList<String>(); | |
30 private final List<String> pairIdsHistorical = new ArrayList<String>(); | |
31 | |
32 public SinfoFlowdepthDevelopmentRunner(final String username, final String password, final CalcMode sinfoCalcFlowDepth, final FilenameMapper file, | |
33 final double from, final double to, final River river) throws ConnectionException, ServerException { | |
34 super(username, password, AbstractModuleRunner.Infotype.sinfo, sinfoCalcFlowDepth, file, from, to, river); | |
35 | |
36 } | |
37 | |
38 public void addCurrentRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException { | |
39 this.pairIdsCurrent.add(super.getRecommendationPairString(rec1, rec2)); | |
40 } | |
41 | |
42 public void addHistoricalRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException { | |
43 this.pairIdsHistorical.add(super.getRecommendationPairString(rec1, rec2)); | |
44 } | |
45 | |
46 @Override | |
47 public void runTest(final boolean exportToFile) throws ServerException, IOException { | |
48 /* Select River */ | |
49 super.selectRiver(); | |
50 | |
51 /* Select CalcMode */ | |
52 super.selectCalcMode(); | |
53 | |
54 /* Select Range */ | |
55 super.selectRange(); | |
56 | |
57 /* Select current Fixpunkte */ | |
58 feedAndGo(super.extractPairData(this.pairIdsCurrent, "diffid_current"), 0); | |
59 | |
60 /* Select historical Fixpunkte */ | |
61 feedAndGo(super.extractPairData(this.pairIdsHistorical, "diffid_historical"), 0); | |
62 | |
63 describeCollection(); | |
64 | |
65 super.export(exportToFile); | |
66 } | |
67 } |