Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
9566:9826b465b751 | 9567:86e522bc7f36 |
---|---|
12 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; | 12 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; |
13 import org.dive4elements.river.client.shared.exceptions.ServerException; | 13 import org.dive4elements.river.client.shared.exceptions.ServerException; |
14 | 14 |
15 import test.AbstractBerechnungsartenTester.River; | 15 import test.AbstractBerechnungsartenTester.River; |
16 import test.AbstractModuleRunner; | 16 import test.AbstractModuleRunner; |
17 import test.IFilenameMapper; | |
18 import test.SimpleRecommendation; | 17 import test.SimpleRecommendation; |
19 import test.sinfo.SinfoBerechnungsartenTester.CalcMode; | 18 import test.sinfo.SinfoBerechnungsartenTester.CalcMode; |
20 import test.sinfo.SinfoFloodDurationRiversideChoice.RiversideChoiceKey; | 19 import test.sinfo.SinfoFloodDurationRiversideChoice.RiversideChoiceKey; |
21 | 20 |
22 /** | 21 /** |
29 throw new UnsupportedOperationException(); | 28 throw new UnsupportedOperationException(); |
30 } | 29 } |
31 | 30 |
32 // HELPER-Methods: | 31 // HELPER-Methods: |
33 | 32 |
34 public final static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final IFilenameMapper file, final double from, final double to, | 33 public final static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final double from, final double to, final River river, |
35 final River beispielfluss, final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { | 34 final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { |
36 // TODO: make recommendationPair to method parameter if needed | 35 // TODO: make recommendationPair to method parameter if needed |
37 final SinfoFlowdepthMinMaxRunner proof = new SinfoFlowdepthMinMaxRunner(CalcMode.sinfo_calc_flow_depth_minmax, file, from, to, beispielfluss); | 36 final SinfoFlowdepthMinMaxRunner proof = new SinfoFlowdepthMinMaxRunner(CalcMode.sinfo_calc_flow_depth_minmax, from, to, river); |
38 proof.addRecommendationPair(rec0, rec1); | 37 proof.addRecommendationPair(rec0, rec1); |
39 | 38 |
40 return proof; | 39 return proof; |
41 } | 40 } |
42 | 41 |
43 public static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final IFilenameMapper file, final int from, final int to, final River river, | 42 public static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final int from, final int to, final River river, |
44 final SimpleRecommendation simpleRecommendation0, final SimpleRecommendation simpleRecommendation1, | 43 final SimpleRecommendation simpleRecommendation0, final SimpleRecommendation simpleRecommendation1, |
45 final SimpleRecommendation simpleRecommendation2, final SimpleRecommendation simpleRecommendation3) throws ConnectionException, ServerException { | 44 final SimpleRecommendation simpleRecommendation2, final SimpleRecommendation simpleRecommendation3) throws ConnectionException, ServerException { |
46 final SinfoFlowdepthMinMaxRunner proof = (SinfoFlowdepthMinMaxRunner) createSinfoFlowdepthMinMaxTest(file, from, to, river, simpleRecommendation0, | 45 final SinfoFlowdepthMinMaxRunner proof = (SinfoFlowdepthMinMaxRunner) createSinfoFlowdepthMinMaxTest(from, to, river, simpleRecommendation0, |
47 simpleRecommendation1); | 46 simpleRecommendation1); |
48 proof.addRecommendationPair(simpleRecommendation2, simpleRecommendation3); | 47 proof.addRecommendationPair(simpleRecommendation2, simpleRecommendation3); |
49 return proof; | 48 return proof; |
50 } | 49 } |
51 | 50 |
52 public final static AbstractModuleRunner createSinfoFlowdepthTest(final IFilenameMapper file, final double from, final double to, final River river, | 51 public final static AbstractModuleRunner createSinfoFlowdepthTest(final double from, final double to, final River river, final boolean useTkh, |
53 final boolean useTkh, final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { | 52 final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { |
54 final SinfoFlowdepthRunner proof = new SinfoFlowdepthRunner(CalcMode.sinfo_calc_flow_depth, file, from, to, river, useTkh); | 53 final SinfoFlowdepthRunner proof = new SinfoFlowdepthRunner(CalcMode.sinfo_calc_flow_depth, from, to, river, useTkh); |
55 proof.addRecommendationPair(rec0, rec1); | 54 proof.addRecommendationPair(rec0, rec1); |
56 | 55 |
57 return proof; | 56 return proof; |
58 } | 57 } |
59 | 58 |
60 public final static AbstractModuleRunner createSinfoFlowdepthDevelopmentTest(final IFilenameMapper file, final double from, final double to, | 59 public final static AbstractModuleRunner createSinfoFlowdepthDevelopmentTest(final double from, final double to, final River river, |
61 final River river, final SimpleRecommendation rec0_curr, final SimpleRecommendation rec1_curr, final SimpleRecommendation rec0_hist, | 60 final SimpleRecommendation rec0_curr, final SimpleRecommendation rec1_curr, final SimpleRecommendation rec0_hist, |
62 final SimpleRecommendation rec1_hist) throws ConnectionException, ServerException { | 61 final SimpleRecommendation rec1_hist) throws ConnectionException, ServerException { |
63 final SinfoFlowdepthDevelopmentRunner proof = new SinfoFlowdepthDevelopmentRunner(CalcMode.sinfo_calc_flow_depth_development, file, from, to, river); | 62 final SinfoFlowdepthDevelopmentRunner proof = new SinfoFlowdepthDevelopmentRunner(CalcMode.sinfo_calc_flow_depth_development, from, to, river); |
64 proof.addCurrentRecommendationPair(rec0_curr, rec1_curr); | 63 proof.addCurrentRecommendationPair(rec0_curr, rec1_curr); |
65 proof.addHistoricalRecommendationPair(rec0_hist, rec1_hist); | 64 proof.addHistoricalRecommendationPair(rec0_hist, rec1_hist); |
66 return proof; | 65 return proof; |
67 } | 66 } |
68 | 67 |
69 public final static AbstractModuleRunner createSinfoTkhTest(final IFilenameMapper file, final double from, final double to, final River river, | 68 public final static AbstractModuleRunner createSinfoTkhTest(final double from, final double to, final River river, |
70 // final boolean useTkh, | 69 // final boolean useTkh, |
71 final double[] wasserspiegellage) throws ConnectionException, ServerException { | 70 final double[] wasserspiegellage) throws ConnectionException, ServerException { |
72 final SinfoTkhRunner proof = new SinfoTkhRunner(CalcMode.sinfo_calc_transport_bodies_heights, file, from, to, river, wasserspiegellage); | 71 final SinfoTkhRunner proof = new SinfoTkhRunner(CalcMode.sinfo_calc_transport_bodies_heights, from, to, river, wasserspiegellage); |
73 | 72 |
74 return proof; | 73 return proof; |
75 } | 74 } |
76 | 75 |
77 public final static AbstractModuleRunner createSinfoCollisionYearsTest(final IFilenameMapper file, final double from, final double to, final River river, | 76 public final static AbstractModuleRunner createSinfoCollisionYearsTest(final double from, final double to, final River river, final int[] years) |
78 final int[] years) throws ConnectionException, ServerException { | 77 throws ConnectionException, ServerException { |
79 final SinfoCollisionRunner proof = new SinfoCollisionRunner(file, from, to, river, years, null); | 78 final SinfoCollisionRunner proof = new SinfoCollisionRunner(from, to, river, years, null) |
79 // .addOutputTest(file, outputModeName, overideWriteToDisk, | |
80 // params) | |
81 ; | |
80 | 82 |
81 return proof; | 83 return proof; |
82 } | 84 } |
83 | 85 |
84 public final static AbstractModuleRunner createSinfoCollisionEpochsTest(final IFilenameMapper file, final double from, final double to, final River river, | 86 public final static AbstractModuleRunner createSinfoCollisionEpochsTest(final double from, final double to, final River river, final String epochs) |
85 final String epochs) throws ConnectionException, ServerException { | 87 throws ConnectionException, ServerException { |
86 final SinfoCollisionRunner proof = new SinfoCollisionRunner(file, from, to, river, null, epochs); | 88 final SinfoCollisionRunner proof = new SinfoCollisionRunner(from, to, river, null, epochs); |
87 | 89 |
88 return proof; | 90 return proof; |
89 } | 91 } |
90 | 92 |
91 public final static AbstractModuleRunner createSinfoFloodDurationTest(final IFilenameMapper file, final double from, final double to, final River river, | 93 public final static AbstractModuleRunner createSinfoFloodDurationTest(final double from, final double to, final River river, |
92 final double[] wasserspiegellage, final boolean showWspl, final RiversideChoiceKey riverside) throws ConnectionException, ServerException { | 94 final double[] wasserspiegellage, final boolean showWspl, final RiversideChoiceKey riverside) throws ConnectionException, ServerException { |
93 final SinfoFloodDurationRunner proof = new SinfoFloodDurationRunner(CalcMode.sinfo_calc_flood_duration, file, from, to, river, wasserspiegellage, | 95 final SinfoFloodDurationRunner proof = new SinfoFloodDurationRunner(CalcMode.sinfo_calc_flood_duration, from, to, river, wasserspiegellage, riverside, |
94 riverside, showWspl); | 96 showWspl); |
95 | 97 |
96 return proof; | 98 return proof; |
97 } | 99 } |
98 } | 100 } |