Mercurial > dive4elements > river
annotate gwt-client/src/test/java/test/RunnerCreatorHelper.java @ 9417:46e3e23cca0b
sinfo.collision jUnit-Test
author | gernotbelger |
---|---|
date | Thu, 16 Aug 2018 17:32:05 +0200 |
parents | dba14da43f23 |
children | 9fe26f525ae3 |
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 | |
9228 | 35 public final static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final FilenameMapper file, final double from, final double to, |
36 final River beispielfluss, final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { | |
9127 | 37 // TODO: make recommendationPair to method parameter if needed |
9228 | 38 final SinfoFlowdepthMinMaxRunner proof = new SinfoFlowdepthMinMaxRunner(user, pw, CalcMode.sinfo_calc_flow_depth_minmax, file, from, to, beispielfluss); |
39 proof.addRecommendationPair(rec0, rec1); | |
9127 | 40 |
41 return proof; | |
42 } | |
43 | |
9228 | 44 public static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final FilenameMapper file, final int from, final int to, final River river, |
45 final SimpleRecommendation simpleRecommendation0, final SimpleRecommendation simpleRecommendation1, | |
46 final SimpleRecommendation simpleRecommendation2, final SimpleRecommendation simpleRecommendation3) throws ConnectionException, ServerException { | |
47 final SinfoFlowdepthMinMaxRunner proof = (SinfoFlowdepthMinMaxRunner) createSinfoFlowdepthMinMaxTest(file, from, to, river, simpleRecommendation0, | |
48 simpleRecommendation1); | |
49 proof.addRecommendationPair(simpleRecommendation2, simpleRecommendation3); | |
50 return proof; | |
51 } | |
52 | |
9148 | 53 public final static AbstractModuleRunner createSinfoFlowdepthTest(final FilenameMapper file, final double from, final double to, final River river, |
9127 | 54 final boolean useTkh, final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { |
9148 | 55 final SinfoFlowdepthRunner proof = new SinfoFlowdepthRunner(user, pw, CalcMode.sinfo_calc_flow_depth, file, from, to, river, useTkh); |
9127 | 56 proof.addRecommendationPair(rec0, rec1); |
57 | |
58 return proof; | |
59 } | |
9148 | 60 |
61 public final static AbstractModuleRunner createSinfoFlowdepthDevelopmentTest(final FilenameMapper file, final double from, final double to, | |
62 final River river, final SimpleRecommendation rec0_curr, final SimpleRecommendation rec1_curr, final SimpleRecommendation rec0_hist, | |
63 final SimpleRecommendation rec1_hist) throws ConnectionException, ServerException { | |
64 final SinfoFlowdepthDevelopmentRunner proof = new SinfoFlowdepthDevelopmentRunner(user, pw, CalcMode.sinfo_calc_flow_depth_development, file, from, to, | |
65 river); | |
66 proof.addCurrentRecommendationPair(rec0_curr, rec1_curr); | |
67 proof.addHistoricalRecommendationPair(rec0_hist, rec1_hist); | |
68 return proof; | |
69 } | |
9226 | 70 |
71 public final static AbstractModuleRunner createSinfoTkhTest(final FilenameMapper file, final double from, final double to, final River river, | |
72 // final boolean useTkh, | |
73 final double[] wasserspiegellage) throws ConnectionException, ServerException { | |
74 final SinfoTkhRunner proof = new SinfoTkhRunner(user, pw, CalcMode.sinfo_calc_transport_bodies_heights, file, from, to, river, wasserspiegellage); | |
75 | |
76 return proof; | |
77 } | |
78 | |
9417 | 79 public final static AbstractModuleRunner createSinfoCollisionYearsTest(final FilenameMapper file, final double from, final double to, final River river, |
80 final int[] years) throws ConnectionException, ServerException { | |
81 final SinfoCollisionRunner proof = new SinfoCollisionRunner(user, pw, file, from, to, river, years, null); | |
82 | |
83 return proof; | |
84 } | |
85 | |
86 public final static AbstractModuleRunner createSinfoCollisionEpochsTest(final FilenameMapper file, final double from, final double to, final River river, | |
87 final String epochs) throws ConnectionException, ServerException { | |
88 final SinfoCollisionRunner proof = new SinfoCollisionRunner(user, pw, file, from, to, river, null, epochs); | |
89 | |
90 return proof; | |
91 } | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
92 } |