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