Mercurial > dive4elements > river
annotate gwt-client/src/test/java/test/RunnerCreatorHelper.java @ 9226:83aee0942eae
JUnit-Tests - tkh works
author | gernotbelger |
---|---|
date | Wed, 04 Jul 2018 17:14:16 +0200 |
parents | 48d87af1243e |
children | dba14da43f23 |
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 org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; | |
13 import org.dive4elements.river.client.shared.exceptions.ServerException; | |
14 | |
15 import test.BerechnungsartenTester.CalcMode; | |
16 import test.BerechnungsartenTester.FilenameMapper; | |
17 import test.BerechnungsartenTester.River; | |
18 | |
19 /** | |
20 * @author Domenico Nardi Tironi | |
21 * | |
22 */ | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
23 public final class RunnerCreatorHelper { |
9127 | 24 |
25 private final static String user = "belger"; | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
26 |
9127 | 27 private final static String pw = "belger"; |
28 | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
29 private RunnerCreatorHelper() { |
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
30 throw new UnsupportedOperationException(); |
9127 | 31 } |
32 | |
33 // HELPER-Methods: | |
34 | |
9148 | 35 public final static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final FilenameMapper helloWorldFile, final double from, final double to, |
9127 | 36 final River beispielfluss) throws ConnectionException, ServerException { |
37 // TODO: make recommendationPair to method parameter if needed | |
9148 | 38 final SinfoFlowdepthMinMaxRunner proof = new SinfoFlowdepthMinMaxRunner(user, pw, CalcMode.sinfo_calc_flow_depth_minmax, helloWorldFile, from, to, |
39 beispielfluss); | |
9127 | 40 proof.addRecommendationPair(new SimpleRecommendation("staticwqkms", "additionals-wstv-0-103", "sinfo_flowdepth_waterlevels"), |
41 new SimpleRecommendation("bedheight", "bedheight-single-36-2015-FP-2015_0-502", "sinfo_flowdepthminmax_heights")); | |
42 | |
43 return proof; | |
44 } | |
45 | |
9148 | 46 public final static AbstractModuleRunner createSinfoFlowdepthTest(final FilenameMapper file, final double from, final double to, final River river, |
9127 | 47 final boolean useTkh, final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { |
9148 | 48 final SinfoFlowdepthRunner proof = new SinfoFlowdepthRunner(user, pw, CalcMode.sinfo_calc_flow_depth, file, from, to, river, useTkh); |
9127 | 49 proof.addRecommendationPair(rec0, rec1); |
50 | |
51 return proof; | |
52 } | |
9148 | 53 |
54 public final static AbstractModuleRunner createSinfoFlowdepthDevelopmentTest(final FilenameMapper file, final double from, final double to, | |
55 final River river, final SimpleRecommendation rec0_curr, final SimpleRecommendation rec1_curr, final SimpleRecommendation rec0_hist, | |
56 final SimpleRecommendation rec1_hist) throws ConnectionException, ServerException { | |
57 final SinfoFlowdepthDevelopmentRunner proof = new SinfoFlowdepthDevelopmentRunner(user, pw, CalcMode.sinfo_calc_flow_depth_development, file, from, to, | |
58 river); | |
59 proof.addCurrentRecommendationPair(rec0_curr, rec1_curr); | |
60 proof.addHistoricalRecommendationPair(rec0_hist, rec1_hist); | |
61 return proof; | |
62 } | |
9226 | 63 |
64 public final static AbstractModuleRunner createSinfoTkhTest(final FilenameMapper file, final double from, final double to, final River river, | |
65 // final boolean useTkh, | |
66 final double[] wasserspiegellage) throws ConnectionException, ServerException { | |
67 final SinfoTkhRunner proof = new SinfoTkhRunner(user, pw, CalcMode.sinfo_calc_transport_bodies_heights, file, from, to, river, wasserspiegellage); | |
68 | |
69 return proof; | |
70 } | |
71 | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
72 } |