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