Mercurial > dive4elements > river
annotate gwt-client/src/test/java/test/BerechnungsartenTester.java @ 9390:f575ff573cbb
"Name der Peilung" columname minfo.
author | gernotbelger |
---|---|
date | Thu, 09 Aug 2018 15:22:31 +0200 |
parents | dba14da43f23 |
children | 46e3e23cca0b |
rev | line source |
---|---|
9031 | 1 package test; |
2 | |
3 import java.io.IOException; | |
4 | |
9127 | 5 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; |
9031 | 6 import org.dive4elements.river.client.shared.exceptions.ServerException; |
9228 | 7 import org.junit.Ignore; |
9127 | 8 import org.junit.Test; |
9031 | 9 |
10 /** | |
11 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
12 */ | |
13 | |
9127 | 14 // REMARK: ignored, because maven will auto-test all tests, but this one needs a running river-artifacts |
15 // For running the JUunit test, the annotation @Ignore has to be disabled | |
9226 | 16 @Ignore |
9127 | 17 public class BerechnungsartenTester { |
9031 | 18 |
9127 | 19 public static enum CalcMode { |
9226 | 20 sinfo_calc_flow_depth, sinfo_calc_flow_depth_development, sinfo_calc_flow_depth_minmax, sinfo_calc_collision, sinfo_calc_transport_bodies_heights, sinfo_calc_flood_duration |
9127 | 21 }; |
22 | |
23 public static enum River { | |
9148 | 24 Beispielfluss, Rhein, Elbe |
9127 | 25 }; |
26 | |
27 public static enum FilenameMapper { | |
28 | |
9226 | 29 FT_MINMAX_RHEIN_1_FILE("/sinfo/flowdepthminmax/sinfo_minmaxft_01.csv"), // |
30 FT_MINMAX_ELBE_2_FILE("/sinfo/flowdepthminmax/sinfo_minmaxft_02.csv"), // | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
31 |
9148 | 32 FT_RHEIN_1_FILE("/sinfo/flowdepth/sinfo_ft_01.csv"), // |
9226 | 33 FT_RHEIN_2_FILE("/sinfo/flowdepth/sinfo_ft_02.csv"), // |
9148 | 34 |
35 FTE_ELBE_FILE("/sinfo/flowdepthdevelopment/sinfo_fte_01.csv"), // | |
9226 | 36 FTE_RHEIN_FILE("/sinfo/flowdepthdevelopment/sinfo_fte_02.csv"), |
37 | |
38 TKH_1_ELBE_FILE("/sinfo/flowdepthtkh/sinfo_tkh_01.csv"), // | |
9228 | 39 TKH_2_RHEIN_FILE("/sinfo/flowdepthtkh/sinfo_tkh_02.csv"), |
40 | |
41 TKH_TKH_RHEIN_FILE("/sinfo/tkh/sinfo_tkh_export.csv"); | |
9127 | 42 |
43 private final String filename; | |
44 | |
45 FilenameMapper(final String filename) { | |
46 this.filename = filename; | |
47 } | |
48 | |
49 public String getFilename() { | |
50 return this.filename; | |
51 } | |
9031 | 52 } |
9127 | 53 |
54 private final Boolean overrideFileExport() { | |
55 return null; | |
56 } | |
57 | |
9228 | 58 /* FLOWDEPTH MIN MAX */ |
59 @Test | |
60 public void testFTMINMAX1() throws ServerException, IOException { | |
61 | |
62 RunnerCreatorHelper.createSinfoFlowdepthMinMaxTest(FilenameMapper.FT_MINMAX_RHEIN_1_FILE, 430, 450, River.Rhein, | |
63 new SimpleRecommendation("bedheight", "bedheight-single-79-2004-MW-DGM-2004_Epoche_NHN", "longitudinal_section"), | |
64 new SimpleRecommendation("staticwqkms", "additionals-wstv-0-269", "longitudinal_section", "Amtl.Festlegung_GlQ(2002)") | |
65 | |
66 ).runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
67 } | |
68 | |
69 @Test | |
70 public void testFTMINMAX2() throws ConnectionException, ServerException, IOException { | |
71 RunnerCreatorHelper.createSinfoFlowdepthMinMaxTest(FilenameMapper.FT_MINMAX_ELBE_2_FILE, 0, 90, River.Elbe, | |
72 // first | |
73 new SimpleRecommendation("bedheight", "bedheight-single-58-2015-MW-FP-2015_0-502", "longitudinal_section", "FP-2015_0-502"), | |
74 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-156", "longitudinal_section", "02.09.2004"), | |
75 | |
76 // second | |
77 new SimpleRecommendation("bedheight", "bedheight-single-58-2015-MW-FP-2015_0-502", "longitudinal_section", "FP-2015_0-502"), | |
78 new SimpleRecommendation("staticwqkms", "fixations-wstv-1-156", "longitudinal_section", "03.09.2004")) | |
79 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
80 } | |
81 | |
82 /* FLOWDEPTH */ | |
9127 | 83 @Test |
9148 | 84 public void testRhein1FT() throws ConnectionException, ServerException, IOException { |
9127 | 85 |
9228 | 86 RunnerCreatorHelper.createSinfoFlowdepthTest(FilenameMapper.FT_RHEIN_1_FILE, 350, 380, River.Rhein, false, |
87 | |
88 new SimpleRecommendation("bedheight", "bedheight-soundings-79-2004-DGM-2004_Epoche_NHN", "longitudinal_section"), | |
89 new SimpleRecommendation("staticwqkms", "additionals-wstv-0-415", "longitudinal_section")) | |
9127 | 90 .runTest(overrideFileExport() != null ? overrideFileExport() : true); |
91 | |
92 } | |
93 | |
94 @Test | |
9226 | 95 public void testRhein2FT() throws ConnectionException, ServerException, IOException { |
9127 | 96 RunnerCreatorHelper |
9226 | 97 .createSinfoFlowdepthTest(FilenameMapper.FT_RHEIN_2_FILE, 655, 675, River.Rhein, true, |
9228 | 98 new SimpleRecommendation("bedheight", "bedheight-soundings-92-2004-NIEDERRHEIN_QP-2004_Epoche_NHN", "longitudinal_section"), |
99 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-323", "longitudinal_section")) | |
100 | |
9127 | 101 .runTest(overrideFileExport() != null ? overrideFileExport() : true); |
102 } | |
103 | |
9228 | 104 /* FLOWDEPTH DEVELOPMENT */ |
9148 | 105 |
9228 | 106 @Test |
107 public void testElbeFTE() throws ConnectionException, ServerException, IOException { | |
108 RunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(FilenameMapper.FTE_ELBE_FILE, 210, 230, River.Elbe, | |
109 // current | |
110 new SimpleRecommendation("bedheight", "bedheight-soundings-66-2008-FP-QP-2008", | |
111 // "bedheight-single-66-2008-MW-FP-QP-2008", | |
112 "longitudinal_section"), | |
113 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-196", "longitudinal_section", "05.05.2008"), // sicher | |
9148 | 114 |
9228 | 115 // historical |
116 new SimpleRecommendation("bedheight", "bedheight-soundings-70-1995-QP-1995", | |
117 // "bedheight-single-70-1995-MW-QP-1995", | |
118 "longitudinal_section"), | |
119 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-186", "longitudinal_section", "18.03.1997")// sicher | |
120 ).runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
121 } | |
9148 | 122 |
9228 | 123 @Test |
124 public void testRheinFTE() throws ConnectionException, ServerException, IOException { | |
125 RunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(FilenameMapper.FTE_RHEIN_FILE, 655, 665, River.Rhein, | |
126 // current | |
127 new SimpleRecommendation("bedheight", "bedheight-single-94-2008-MW-NIEDERRHEIN_QP-2008_Epoche_NHN", | |
128 // "bedheight-single....", | |
129 "longitudinal_section"), | |
130 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-372", "longitudinal_section", "23.09.2009-1"), // sicher | |
131 | |
132 // historical | |
133 new SimpleRecommendation("bedheight", "bedheight-single-89-1991-MW-NIEDERRHEIN_QP-1991_Epoche_NHN", | |
134 // "bedheight-soundings-89-1991-NIEDERRHEIN_QP-1991_Epoche_NHN", | |
135 "longitudinal_section"), | |
136 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-374", "longitudinal_section", "23.09.1991") // sicher | |
137 ).runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
138 } | |
139 | |
140 /* TKH */ | |
141 | |
142 @Test | |
143 public void testElbeTKH_1() throws ConnectionException, ServerException, IOException { | |
144 RunnerCreatorHelper.createSinfoTkhTest(FilenameMapper.TKH_1_ELBE_FILE, 150, 160, River.Elbe, new double[] { 1520.0 }) | |
145 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
146 } | |
147 | |
148 @Test | |
149 public void testRheinTKH_2() throws ConnectionException, ServerException, IOException { | |
150 RunnerCreatorHelper.createSinfoTkhTest(FilenameMapper.TKH_2_RHEIN_FILE, 600, 610, River.Rhein, new double[] { 6125, 6526 }) | |
151 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
152 } | |
153 | |
154 @Test | |
155 public void testTKhTkh() throws ConnectionException, ServerException, IOException { | |
156 RunnerCreatorHelper.createSinfoTkhTest(FilenameMapper.TKH_TKH_RHEIN_FILE, 0, 182.4, River.Beispielfluss, new double[] { 1059.446 }) | |
157 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
158 } | |
9148 | 159 |
9049 | 160 } |