9422
|
1 package test.sinfo; |
9031
|
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; |
9418
|
7 import org.junit.Ignore; |
9127
|
8 import org.junit.Test; |
9031
|
9 |
9422
|
10 import test.AbstractBerechnungsartenTester; |
9567
|
11 import test.FilenameSupplier; |
9422
|
12 import test.ICalcMode; |
|
13 import test.SimpleRecommendation; |
|
14 import test.sinfo.SinfoFloodDurationRiversideChoice.RiversideChoiceKey; |
9418
|
15 |
9567
|
16 @Ignore // ein- oder auskommentieren, je nach Bedarf! |
9422
|
17 public final class SinfoBerechnungsartenTester extends AbstractBerechnungsartenTester { |
|
18 // has to be public for jUnit-Test |
|
19 public static enum CalcMode implements ICalcMode { |
|
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; |
9031
|
21 |
9127
|
22 }; |
|
23 |
9567
|
24 FilenameSupplier FT_MINMAX_RHEIN_1_FILE = new FilenameSupplier("/sinfo/flowdepthminmax/sinfo_minmaxft_01.csv"); |
|
25 FilenameSupplier FT_MINMAX_ELBE_2_FILE = new FilenameSupplier("/sinfo/flowdepthminmax/sinfo_minmaxft_02.csv"); |
9228
|
26 |
9567
|
27 FilenameSupplier FT_RHEIN_1_FILE = new FilenameSupplier("/sinfo/flowdepth/sinfo_ft_01.csv"); |
|
28 FilenameSupplier FT_RHEIN_2_FILE = new FilenameSupplier("/sinfo/flowdepth/sinfo_ft_02.csv"); |
9127
|
29 |
9567
|
30 FilenameSupplier FTE_ELBE_FILE = new FilenameSupplier("/sinfo/flowdepthdevelopment/sinfo_fte_01.csv"); |
|
31 FilenameSupplier FTE_RHEIN_FILE = new FilenameSupplier("/sinfo/flowdepthdevelopment/sinfo_fte_02.csv"); |
9127
|
32 |
9567
|
33 FilenameSupplier TKH_1_ELBE_FILE = new FilenameSupplier("/sinfo/tkh/sinfo_tkh_01.csv"); |
|
34 FilenameSupplier TKH_2_RHEIN_FILE = new FilenameSupplier("/sinfo/tkh/sinfo_tkh_02.csv"); |
|
35 FilenameSupplier TKH_1_ELBE_CHART_FILE = new FilenameSupplier("/sinfo/tkh/sinfo_tkh_chart_01.csv"); |
|
36 |
|
37 // FilenameSupplier TKH_TKH_RHEIN_FILE = new FilenameSupplier("/sinfo/tkh/sinfo_tkh_export.csv"); |
|
38 |
|
39 // FilenameSupplier COLLISION_RHEIN_HELLO_WORLD_FILE = new |
|
40 // FilenameSupplier("/sinfo/collision/sinfo_collision_export.csv"); |
|
41 // FilenameSupplier COLLISION_RHEIN_EPOCH_HELLO_WORLD_FILE = new |
|
42 // FilenameSupplier("/sinfo/collision/sinfo_collision_epoch_export.csv"); |
|
43 |
|
44 FilenameSupplier COLLISION_RHEIN_01 = new FilenameSupplier("/sinfo/collision/sinfo_grund_01.csv"); |
|
45 FilenameSupplier COLLISION_RHEIN_02 = new FilenameSupplier("/sinfo/collision/sinfo_grund_02.csv"); |
|
46 |
|
47 FilenameSupplier FLOOD_DURATION_CS_384_6 = new FilenameSupplier("/sinfo/floodduration/sinfo_uedi_01_chart_dauer_384km6.csv"); |
|
48 FilenameSupplier FLOOD_DURATION_CS_384_7 = new FilenameSupplier("/sinfo/floodduration/sinfo_uedi_01_chart_dauer_384km7.csv"); |
|
49 FilenameSupplier FLOOD_DURATION_CS_384_9 = new FilenameSupplier("/sinfo/floodduration/sinfo_uedi_01_chart_dauer_384km9.csv"); |
|
50 |
|
51 // FilenameSupplier FLOOD_DURATION_HELLO_WORLD_FILE = new |
|
52 // FilenameSupplier("/sinfo/floodduration/sinfo_floodduration_export.csv"); |
9127
|
53 |
9228
|
54 /* FLOWDEPTH MIN MAX */ |
|
55 @Test |
|
56 public void testFTMINMAX1() throws ServerException, IOException { |
|
57 |
9567
|
58 SinfoRunnerCreatorHelper |
|
59 .createSinfoFlowdepthMinMaxTest(430, 450, River.Rhein, |
|
60 new SimpleRecommendation("bedheight", "bedheight-single-103-2004-DGM-2004_Epoche_NHN", "longitudinal_section"), |
|
61 new SimpleRecommendation("staticwqkms", "additionals-wstv-0-415", "longitudinal_section", "Amtl.Festlegung_GlQ(2002)"))// |
|
62 .addOutputTest(this.FT_MINMAX_RHEIN_1_FILE, "sinfo_flowdepthminmax_export", null)// |
|
63 .runTest(); |
9228
|
64 } |
|
65 |
|
66 @Test |
|
67 public void testFTMINMAX2() throws ConnectionException, ServerException, IOException { |
9567
|
68 SinfoRunnerCreatorHelper.createSinfoFlowdepthMinMaxTest(0, 90, River.Elbe, |
9228
|
69 // first |
9567
|
70 // bedheight-single-58-2015-FP-2015_0-502 |
|
71 |
9228
|
72 new SimpleRecommendation("bedheight", "bedheight-single-58-2015-MW-FP-2015_0-502", "longitudinal_section", "FP-2015_0-502"), |
9567
|
73 // fixations-wstv-0-156 |
9228
|
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"), |
9567
|
78 new SimpleRecommendation("staticwqkms", "fixations-wstv-1-156", "longitudinal_section", "03.09.2004"))// |
|
79 .addOutputTest(this.FT_MINMAX_ELBE_2_FILE, "sinfo_flowdepthminmax_export", null)// |
|
80 .runTest(); |
9228
|
81 } |
|
82 |
|
83 /* FLOWDEPTH */ |
9127
|
84 @Test |
9148
|
85 public void testRhein1FT() throws ConnectionException, ServerException, IOException { |
9127
|
86 |
9567
|
87 SinfoRunnerCreatorHelper.createSinfoFlowdepthTest(350, 380, River.Rhein, false, |
|
88 // [b34f91bd-17b3-435e-b609-8026980ed301;bedheight;0;DGM-2004_Epoche_NHN]#[e1bedb5e-edee-427d-b74e-7566652ebfda;staticwqkms;0;Amtl.Festlegung_GlQ(2002)]]] |
|
89 // debug at org.dive4elements.river.client.shared.model.DefaultData.Recommendation line 142 |
|
90 new SimpleRecommendation("bedheight", " bedheight-single-103-2004-DGM-2004_Epoche_NHN", "longitudinal_section"), |
|
91 new SimpleRecommendation("staticwqkms", "additionals-wstv-0-415", "longitudinal_section"))// |
9228
|
92 |
9567
|
93 .addOutputTest(this.FT_RHEIN_1_FILE, "sinfo_flowdepth_export", null)// |
|
94 .runTest(); |
9127
|
95 } |
|
96 |
|
97 @Test |
9226
|
98 public void testRhein2FT() throws ConnectionException, ServerException, IOException { |
9422
|
99 SinfoRunnerCreatorHelper |
9567
|
100 .createSinfoFlowdepthTest(655, 675, River.Rhein, true, |
9228
|
101 new SimpleRecommendation("bedheight", "bedheight-soundings-92-2004-NIEDERRHEIN_QP-2004_Epoche_NHN", "longitudinal_section"), |
9567
|
102 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-323", "longitudinal_section"))// |
9228
|
103 |
9567
|
104 .addOutputTest(this.FT_RHEIN_2_FILE, "sinfo_flowdepth_export", null)// |
|
105 .runTest(); |
9127
|
106 } |
|
107 |
9228
|
108 /* FLOWDEPTH DEVELOPMENT */ |
9148
|
109 |
9228
|
110 @Test |
|
111 public void testElbeFTE() throws ConnectionException, ServerException, IOException { |
9567
|
112 SinfoRunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(210, 230, River.Elbe, |
9228
|
113 // current |
|
114 new SimpleRecommendation("bedheight", "bedheight-soundings-66-2008-FP-QP-2008", |
|
115 // "bedheight-single-66-2008-MW-FP-QP-2008", |
|
116 "longitudinal_section"), |
|
117 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-196", "longitudinal_section", "05.05.2008"), // sicher |
9148
|
118 |
9228
|
119 // historical |
|
120 new SimpleRecommendation("bedheight", "bedheight-soundings-70-1995-QP-1995", |
|
121 // "bedheight-single-70-1995-MW-QP-1995", |
|
122 "longitudinal_section"), |
|
123 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-186", "longitudinal_section", "18.03.1997")// sicher |
9567
|
124 )// |
|
125 |
|
126 .addOutputTest(this.FTE_ELBE_FILE, "sinfo_flowdepthdevelopment_export", null)// |
|
127 .runTest(); |
9228
|
128 } |
9148
|
129 |
9228
|
130 @Test |
|
131 public void testRheinFTE() throws ConnectionException, ServerException, IOException { |
9567
|
132 SinfoRunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(655, 665, River.Rhein, |
9228
|
133 // current |
|
134 new SimpleRecommendation("bedheight", "bedheight-single-94-2008-MW-NIEDERRHEIN_QP-2008_Epoche_NHN", |
|
135 // "bedheight-single....", |
|
136 "longitudinal_section"), |
|
137 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-372", "longitudinal_section", "23.09.2009-1"), // sicher |
|
138 |
|
139 // historical |
|
140 new SimpleRecommendation("bedheight", "bedheight-single-89-1991-MW-NIEDERRHEIN_QP-1991_Epoche_NHN", |
|
141 // "bedheight-soundings-89-1991-NIEDERRHEIN_QP-1991_Epoche_NHN", |
|
142 "longitudinal_section"), |
|
143 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-374", "longitudinal_section", "23.09.1991") // sicher |
9567
|
144 )// |
|
145 |
|
146 .addOutputTest(this.FTE_RHEIN_FILE, "sinfo_flowdepthdevelopment_export", null)// |
|
147 .runTest(); |
9228
|
148 } |
|
149 |
|
150 /* TKH */ |
|
151 |
|
152 @Test |
|
153 public void testElbeTKH_1() throws ConnectionException, ServerException, IOException { |
9567
|
154 SinfoRunnerCreatorHelper.createSinfoTkhTest(150, 160, River.Elbe, new double[] { 1520.0 })// |
|
155 .addOutputTest(this.TKH_1_ELBE_FILE, "sinfo_tkh_export", null)// |
|
156 .addOutputTest(this.TKH_1_ELBE_CHART_FILE, "sinfo_tkk", null)// |
|
157 |
|
158 .runTest(); |
9228
|
159 } |
|
160 |
|
161 @Test |
|
162 public void testRheinTKH_2() throws ConnectionException, ServerException, IOException { |
9567
|
163 SinfoRunnerCreatorHelper.createSinfoTkhTest(600, 610, River.Rhein, new double[] { 6125, 6526 })// |
|
164 .addOutputTest(this.TKH_2_RHEIN_FILE, "sinfo_tkh_export", null)// |
|
165 .runTest(); |
9228
|
166 } |
9148
|
167 |
9417
|
168 @Test |
9567
|
169 public void testCollision_01() throws ConnectionException, ServerException, IOException { |
|
170 SinfoRunnerCreatorHelper.createSinfoCollisionYearsTest(336.2, 866.3, River.Rhein, new int[] { 2003, 2006, 2007 })// |
|
171 |
|
172 .addOutputTest(this.COLLISION_RHEIN_01, "sinfo_collision_export", null)// |
|
173 .runTest(); |
9417
|
174 } |
|
175 |
|
176 @Test |
9567
|
177 public void testCollision_02() throws ConnectionException, ServerException, IOException { |
|
178 SinfoRunnerCreatorHelper.createSinfoCollisionEpochsTest(336.2, 866.3, River.Rhein, "2002,2007;2005,2009;")// |
|
179 |
|
180 .addOutputTest(this.COLLISION_RHEIN_02, "sinfo_collision_export", null)// |
|
181 .runTest(); |
9417
|
182 } |
|
183 |
9418
|
184 @Test |
9567
|
185 public void testFloodDurationDurCurves() throws ConnectionException, ServerException, IOException { |
|
186 SinfoRunnerCreatorHelper.createSinfoFloodDurationTest(336.2, 865.5, River.Rhein, null, false, RiversideChoiceKey.BOTH)// |
|
187 .addOutputTest(this.FLOOD_DURATION_CS_384_6, "sinfo_floodduration_curve", "384.6")// |
|
188 .addOutputTest(this.FLOOD_DURATION_CS_384_7, "sinfo_floodduration_curve", "384.7")// |
|
189 .addOutputTest(this.FLOOD_DURATION_CS_384_9, "sinfo_floodduration_curve", "384.9")// |
|
190 // .addOutputTest(this.FLOOD_DURATION_HELLO_WORLD_FILE, "sinfo_floodduration_export", null)// |
|
191 .runTest(); |
9418
|
192 } |
|
193 |
9567
|
194 // // @Test |
|
195 // public void testFloodDuration_HELLO_WORLD() throws ConnectionException, ServerException, IOException { |
|
196 // SinfoRunnerCreatorHelper.createSinfoFloodDurationTest(336.2, 865.5, River.Rhein, new double[] { 2091.011 }, true, |
|
197 // RiversideChoiceKey.BOTH)// |
|
198 // |
|
199 // .addOutputTest(this.FLOOD_DURATION_HELLO_WORLD_FILE, "sinfo_floodduration_export", null)// |
|
200 // .runTest(); |
|
201 // } |
|
202 |
9049
|
203 } |