Mercurial > dive4elements > river
comparison gwt-client/src/test/java/test/sinfo/SinfoBerechnungsartenTester.java @ 9570:531a60b7af95
failed tests will be saved to disk
author | gernotbelger |
---|---|
date | Mon, 05 Nov 2018 17:15:30 +0100 |
parents | 86e522bc7f36 |
children | e72fbd8e7cab |
comparison
equal
deleted
inserted
replaced
9569:9f83ebf67c92 | 9570:531a60b7af95 |
---|---|
2 | 2 |
3 import java.io.IOException; | 3 import java.io.IOException; |
4 | 4 |
5 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; | 5 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; |
6 import org.dive4elements.river.client.shared.exceptions.ServerException; | 6 import org.dive4elements.river.client.shared.exceptions.ServerException; |
7 import org.junit.Ignore; | |
8 import org.junit.Test; | 7 import org.junit.Test; |
9 | 8 |
10 import test.AbstractBerechnungsartenTester; | 9 import test.AbstractBerechnungsartenTester; |
11 import test.FilenameSupplier; | 10 import test.FilenameSupplier; |
12 import test.ICalcMode; | 11 import test.ICalcMode; |
13 import test.SimpleRecommendation; | 12 import test.SimpleRecommendation; |
14 import test.sinfo.SinfoFloodDurationRiversideChoice.RiversideChoiceKey; | 13 import test.sinfo.SinfoFloodDurationRiversideChoice.RiversideChoiceKey; |
15 | 14 |
16 @Ignore // ein- oder auskommentieren, je nach Bedarf! | 15 //@Ignore // ein- oder auskommentieren, je nach Bedarf! |
17 public final class SinfoBerechnungsartenTester extends AbstractBerechnungsartenTester { | 16 public final class SinfoBerechnungsartenTester extends AbstractBerechnungsartenTester { |
18 // has to be public for jUnit-Test | 17 // has to be public for jUnit-Test |
19 public static enum CalcMode implements ICalcMode { | 18 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; | 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; |
21 | 20 |
54 /* FLOWDEPTH MIN MAX */ | 53 /* FLOWDEPTH MIN MAX */ |
55 @Test | 54 @Test |
56 public void testFTMINMAX1() throws ServerException, IOException { | 55 public void testFTMINMAX1() throws ServerException, IOException { |
57 | 56 |
58 SinfoRunnerCreatorHelper | 57 SinfoRunnerCreatorHelper |
59 .createSinfoFlowdepthMinMaxTest(430, 450, River.Rhein, | 58 .createSinfoFlowdepthMinMaxTest(super.testFolder, 433, 450, River.Rhein, |
60 new SimpleRecommendation("bedheight", "bedheight-single-103-2004-DGM-2004_Epoche_NHN", "longitudinal_section"), | 59 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)"))// | 60 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)// | 61 .addOutputTest(this.FT_MINMAX_RHEIN_1_FILE, "sinfo_flowdepthminmax_export", null)// |
63 .runTest(); | 62 .runTest(); |
64 } | 63 } |
65 | 64 |
66 @Test | 65 @Test |
67 public void testFTMINMAX2() throws ConnectionException, ServerException, IOException { | 66 public void testFTMINMAX2() throws ConnectionException, ServerException, IOException { |
68 SinfoRunnerCreatorHelper.createSinfoFlowdepthMinMaxTest(0, 90, River.Elbe, | 67 SinfoRunnerCreatorHelper.createSinfoFlowdepthMinMaxTest(this.testFolder, 0, 90, River.Elbe, |
69 // first | 68 // first |
70 // bedheight-single-58-2015-FP-2015_0-502 | 69 // bedheight-single-58-2015-FP-2015_0-502 |
71 | 70 |
72 new SimpleRecommendation("bedheight", "bedheight-single-58-2015-MW-FP-2015_0-502", "longitudinal_section", "FP-2015_0-502"), | 71 new SimpleRecommendation("bedheight", "bedheight-single-58-2015-MW-FP-2015_0-502", "longitudinal_section", "FP-2015_0-502"), |
73 // fixations-wstv-0-156 | 72 // fixations-wstv-0-156 |
82 | 81 |
83 /* FLOWDEPTH */ | 82 /* FLOWDEPTH */ |
84 @Test | 83 @Test |
85 public void testRhein1FT() throws ConnectionException, ServerException, IOException { | 84 public void testRhein1FT() throws ConnectionException, ServerException, IOException { |
86 | 85 |
87 SinfoRunnerCreatorHelper.createSinfoFlowdepthTest(350, 380, River.Rhein, false, | 86 SinfoRunnerCreatorHelper.createSinfoFlowdepthTest(this.testFolder, 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)]]] | 87 // [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 | 88 // 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"), | 89 new SimpleRecommendation("bedheight", " bedheight-single-103-2004-DGM-2004_Epoche_NHN", "longitudinal_section"), |
91 new SimpleRecommendation("staticwqkms", "additionals-wstv-0-415", "longitudinal_section"))// | 90 new SimpleRecommendation("staticwqkms", "additionals-wstv-0-415", "longitudinal_section"))// |
92 | 91 |
95 } | 94 } |
96 | 95 |
97 @Test | 96 @Test |
98 public void testRhein2FT() throws ConnectionException, ServerException, IOException { | 97 public void testRhein2FT() throws ConnectionException, ServerException, IOException { |
99 SinfoRunnerCreatorHelper | 98 SinfoRunnerCreatorHelper |
100 .createSinfoFlowdepthTest(655, 675, River.Rhein, true, | 99 .createSinfoFlowdepthTest(this.testFolder, 655, 675, River.Rhein, true, |
101 new SimpleRecommendation("bedheight", "bedheight-soundings-92-2004-NIEDERRHEIN_QP-2004_Epoche_NHN", "longitudinal_section"), | 100 new SimpleRecommendation("bedheight", "bedheight-soundings-92-2004-NIEDERRHEIN_QP-2004_Epoche_NHN", "longitudinal_section"), |
102 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-323", "longitudinal_section"))// | 101 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-323", "longitudinal_section"))// |
103 | 102 |
104 .addOutputTest(this.FT_RHEIN_2_FILE, "sinfo_flowdepth_export", null)// | 103 .addOutputTest(this.FT_RHEIN_2_FILE, "sinfo_flowdepth_export", null)// |
105 .runTest(); | 104 .runTest(); |
107 | 106 |
108 /* FLOWDEPTH DEVELOPMENT */ | 107 /* FLOWDEPTH DEVELOPMENT */ |
109 | 108 |
110 @Test | 109 @Test |
111 public void testElbeFTE() throws ConnectionException, ServerException, IOException { | 110 public void testElbeFTE() throws ConnectionException, ServerException, IOException { |
112 SinfoRunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(210, 230, River.Elbe, | 111 SinfoRunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(this.testFolder, 210, 230, River.Elbe, |
113 // current | 112 // current |
114 new SimpleRecommendation("bedheight", "bedheight-soundings-66-2008-FP-QP-2008", | 113 new SimpleRecommendation("bedheight", "bedheight-soundings-66-2008-FP-QP-2008", |
115 // "bedheight-single-66-2008-MW-FP-QP-2008", | 114 // "bedheight-single-66-2008-MW-FP-QP-2008", |
116 "longitudinal_section"), | 115 "longitudinal_section"), |
117 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-196", "longitudinal_section", "05.05.2008"), // sicher | 116 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-196", "longitudinal_section", "05.05.2008"), // sicher |
127 .runTest(); | 126 .runTest(); |
128 } | 127 } |
129 | 128 |
130 @Test | 129 @Test |
131 public void testRheinFTE() throws ConnectionException, ServerException, IOException { | 130 public void testRheinFTE() throws ConnectionException, ServerException, IOException { |
132 SinfoRunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(655, 665, River.Rhein, | 131 SinfoRunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(this.testFolder, 655, 665, River.Rhein, |
133 // current | 132 // current |
134 new SimpleRecommendation("bedheight", "bedheight-single-94-2008-MW-NIEDERRHEIN_QP-2008_Epoche_NHN", | 133 new SimpleRecommendation("bedheight", "bedheight-single-94-2008-MW-NIEDERRHEIN_QP-2008_Epoche_NHN", |
135 // "bedheight-single....", | 134 // "bedheight-single....", |
136 "longitudinal_section"), | 135 "longitudinal_section"), |
137 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-372", "longitudinal_section", "23.09.2009-1"), // sicher | 136 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-372", "longitudinal_section", "23.09.2009-1"), // sicher |
149 | 148 |
150 /* TKH */ | 149 /* TKH */ |
151 | 150 |
152 @Test | 151 @Test |
153 public void testElbeTKH_1() throws ConnectionException, ServerException, IOException { | 152 public void testElbeTKH_1() throws ConnectionException, ServerException, IOException { |
154 SinfoRunnerCreatorHelper.createSinfoTkhTest(150, 160, River.Elbe, new double[] { 1520.0 })// | 153 SinfoRunnerCreatorHelper.createSinfoTkhTest(this.testFolder, 150, 160, River.Elbe, new double[] { 1520.0 })// |
155 .addOutputTest(this.TKH_1_ELBE_FILE, "sinfo_tkh_export", null)// | 154 .addOutputTest(this.TKH_1_ELBE_FILE, "sinfo_tkh_export", null)// |
156 .addOutputTest(this.TKH_1_ELBE_CHART_FILE, "sinfo_tkk", null)// | 155 .addOutputTest(this.TKH_1_ELBE_CHART_FILE, "sinfo_tkk", null)// |
157 | 156 |
158 .runTest(); | 157 .runTest(); |
159 } | 158 } |
160 | 159 |
161 @Test | 160 @Test |
162 public void testRheinTKH_2() throws ConnectionException, ServerException, IOException { | 161 public void testRheinTKH_2() throws ConnectionException, ServerException, IOException { |
163 SinfoRunnerCreatorHelper.createSinfoTkhTest(600, 610, River.Rhein, new double[] { 6125, 6526 })// | 162 SinfoRunnerCreatorHelper.createSinfoTkhTest(this.testFolder, 600, 610, River.Rhein, new double[] { 6125, 6526 })// |
164 .addOutputTest(this.TKH_2_RHEIN_FILE, "sinfo_tkh_export", null)// | 163 .addOutputTest(this.TKH_2_RHEIN_FILE, "sinfo_tkh_export", null)// |
165 .runTest(); | 164 .runTest(); |
166 } | 165 } |
167 | 166 |
168 @Test | 167 @Test |
169 public void testCollision_01() throws ConnectionException, ServerException, IOException { | 168 public void testCollision_01() throws ConnectionException, ServerException, IOException { |
170 SinfoRunnerCreatorHelper.createSinfoCollisionYearsTest(336.2, 866.3, River.Rhein, new int[] { 2003, 2006, 2007 })// | 169 SinfoRunnerCreatorHelper.createSinfoCollisionYearsTest(this.testFolder, 336.2, 866.3, River.Rhein, new int[] { 2003, 2006, 2007 })// |
171 | 170 |
172 .addOutputTest(this.COLLISION_RHEIN_01, "sinfo_collision_export", null)// | 171 .addOutputTest(this.COLLISION_RHEIN_01, "sinfo_collision_export", null)// |
173 .runTest(); | 172 .runTest(); |
174 } | 173 } |
175 | 174 |
176 @Test | 175 @Test |
177 public void testCollision_02() throws ConnectionException, ServerException, IOException { | 176 public void testCollision_02() throws ConnectionException, ServerException, IOException { |
178 SinfoRunnerCreatorHelper.createSinfoCollisionEpochsTest(336.2, 866.3, River.Rhein, "2002,2007;2005,2009;")// | 177 SinfoRunnerCreatorHelper.createSinfoCollisionEpochsTest(this.testFolder, 336.2, 866.3, River.Rhein, "2002,2007;2005,2009;")// |
179 | 178 |
180 .addOutputTest(this.COLLISION_RHEIN_02, "sinfo_collision_export", null)// | 179 .addOutputTest(this.COLLISION_RHEIN_02, "sinfo_collision_export", null)// |
181 .runTest(); | 180 .runTest(); |
182 } | 181 } |
183 | 182 |
184 @Test | 183 @Test |
185 public void testFloodDurationDurCurves() throws ConnectionException, ServerException, IOException { | 184 public void testFloodDurationDurCurves() throws ConnectionException, ServerException, IOException { |
186 SinfoRunnerCreatorHelper.createSinfoFloodDurationTest(336.2, 865.5, River.Rhein, null, false, RiversideChoiceKey.BOTH)// | 185 SinfoRunnerCreatorHelper.createSinfoFloodDurationTest(this.testFolder, 336.2, 865.5, River.Rhein, null, false, RiversideChoiceKey.BOTH)// |
187 .addOutputTest(this.FLOOD_DURATION_CS_384_6, "sinfo_floodduration_curve", "384.6")// | 186 .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")// | 187 .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")// | 188 .addOutputTest(this.FLOOD_DURATION_CS_384_9, "sinfo_floodduration_curve", "384.9")// |
190 // .addOutputTest(this.FLOOD_DURATION_HELLO_WORLD_FILE, "sinfo_floodduration_export", null)// | 189 // .addOutputTest(this.FLOOD_DURATION_HELLO_WORLD_FILE, "sinfo_floodduration_export", null)// |
191 .runTest(); | 190 .runTest(); |