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