Mercurial > dive4elements > river
annotate gwt-client/src/test/java/test/RunnerCreatorHelper.java @ 9418:9fe26f525ae3
sinfo floodduration jUnit test
author | gernotbelger |
---|---|
date | Thu, 16 Aug 2018 18:15:54 +0200 |
parents | 46e3e23cca0b |
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 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; | |
9418 | 18 import test.SinfoFloodDurationRiversideChoice.RiversideChoiceKey; |
9127 | 19 |
20 /** | |
21 * @author Domenico Nardi Tironi | |
22 * | |
23 */ | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
24 public final class RunnerCreatorHelper { |
9127 | 25 |
26 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
|
27 |
9127 | 28 private final static String pw = "belger"; |
29 | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
30 private RunnerCreatorHelper() { |
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
31 throw new UnsupportedOperationException(); |
9127 | 32 } |
33 | |
34 // HELPER-Methods: | |
35 | |
9228 | 36 public final static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final FilenameMapper file, final double from, final double to, |
37 final River beispielfluss, final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { | |
9127 | 38 // TODO: make recommendationPair to method parameter if needed |
9228 | 39 final SinfoFlowdepthMinMaxRunner proof = new SinfoFlowdepthMinMaxRunner(user, pw, CalcMode.sinfo_calc_flow_depth_minmax, file, from, to, beispielfluss); |
40 proof.addRecommendationPair(rec0, rec1); | |
9127 | 41 |
42 return proof; | |
43 } | |
44 | |
9228 | 45 public static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final FilenameMapper file, final int from, final int to, final River river, |
46 final SimpleRecommendation simpleRecommendation0, final SimpleRecommendation simpleRecommendation1, | |
47 final SimpleRecommendation simpleRecommendation2, final SimpleRecommendation simpleRecommendation3) throws ConnectionException, ServerException { | |
48 final SinfoFlowdepthMinMaxRunner proof = (SinfoFlowdepthMinMaxRunner) createSinfoFlowdepthMinMaxTest(file, from, to, river, simpleRecommendation0, | |
49 simpleRecommendation1); | |
50 proof.addRecommendationPair(simpleRecommendation2, simpleRecommendation3); | |
51 return proof; | |
52 } | |
53 | |
9148 | 54 public final static AbstractModuleRunner createSinfoFlowdepthTest(final FilenameMapper file, final double from, final double to, final River river, |
9127 | 55 final boolean useTkh, final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { |
9148 | 56 final SinfoFlowdepthRunner proof = new SinfoFlowdepthRunner(user, pw, CalcMode.sinfo_calc_flow_depth, file, from, to, river, useTkh); |
9127 | 57 proof.addRecommendationPair(rec0, rec1); |
58 | |
59 return proof; | |
60 } | |
9148 | 61 |
62 public final static AbstractModuleRunner createSinfoFlowdepthDevelopmentTest(final FilenameMapper file, final double from, final double to, | |
63 final River river, final SimpleRecommendation rec0_curr, final SimpleRecommendation rec1_curr, final SimpleRecommendation rec0_hist, | |
64 final SimpleRecommendation rec1_hist) throws ConnectionException, ServerException { | |
65 final SinfoFlowdepthDevelopmentRunner proof = new SinfoFlowdepthDevelopmentRunner(user, pw, CalcMode.sinfo_calc_flow_depth_development, file, from, to, | |
66 river); | |
67 proof.addCurrentRecommendationPair(rec0_curr, rec1_curr); | |
68 proof.addHistoricalRecommendationPair(rec0_hist, rec1_hist); | |
69 return proof; | |
70 } | |
9226 | 71 |
72 public final static AbstractModuleRunner createSinfoTkhTest(final FilenameMapper file, final double from, final double to, final River river, | |
73 // final boolean useTkh, | |
74 final double[] wasserspiegellage) throws ConnectionException, ServerException { | |
75 final SinfoTkhRunner proof = new SinfoTkhRunner(user, pw, CalcMode.sinfo_calc_transport_bodies_heights, file, from, to, river, wasserspiegellage); | |
76 | |
77 return proof; | |
78 } | |
79 | |
9417 | 80 public final static AbstractModuleRunner createSinfoCollisionYearsTest(final FilenameMapper file, final double from, final double to, final River river, |
81 final int[] years) throws ConnectionException, ServerException { | |
82 final SinfoCollisionRunner proof = new SinfoCollisionRunner(user, pw, file, from, to, river, years, null); | |
83 | |
84 return proof; | |
85 } | |
86 | |
87 public final static AbstractModuleRunner createSinfoCollisionEpochsTest(final FilenameMapper file, final double from, final double to, final River river, | |
88 final String epochs) throws ConnectionException, ServerException { | |
89 final SinfoCollisionRunner proof = new SinfoCollisionRunner(user, pw, file, from, to, river, null, epochs); | |
90 | |
91 return proof; | |
92 } | |
9418 | 93 |
94 public final static AbstractModuleRunner createSinfoFloodDurationTest(final FilenameMapper file, final double from, final double to, final River river, | |
95 final double[] wasserspiegellage, final boolean showWspl, final RiversideChoiceKey riverside) throws ConnectionException, ServerException { | |
96 final SinfoFloodDurationRunner proof = new SinfoFloodDurationRunner(user, pw, CalcMode.sinfo_calc_flood_duration, file, from, to, river, | |
97 wasserspiegellage, riverside, showWspl); | |
98 | |
99 return proof; | |
100 } | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
101 } |