Mercurial > dive4elements > river
comparison gwt-client/src/test/java/test/BerechnungsartenTester.java @ 9228:dba14da43f23
JUnit-Tests finish
author | gernotbelger |
---|---|
date | Thu, 05 Jul 2018 13:46:36 +0200 |
parents | 83aee0942eae |
children | 46e3e23cca0b |
comparison
equal
deleted
inserted
replaced
9227:84397da33d17 | 9228:dba14da43f23 |
---|---|
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; | |
7 import org.junit.Test; | 8 import org.junit.Test; |
8 | 9 |
9 /** | 10 /** |
10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 11 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
11 */ | 12 */ |
33 | 34 |
34 FTE_ELBE_FILE("/sinfo/flowdepthdevelopment/sinfo_fte_01.csv"), // | 35 FTE_ELBE_FILE("/sinfo/flowdepthdevelopment/sinfo_fte_01.csv"), // |
35 FTE_RHEIN_FILE("/sinfo/flowdepthdevelopment/sinfo_fte_02.csv"), | 36 FTE_RHEIN_FILE("/sinfo/flowdepthdevelopment/sinfo_fte_02.csv"), |
36 | 37 |
37 TKH_1_ELBE_FILE("/sinfo/flowdepthtkh/sinfo_tkh_01.csv"), // | 38 TKH_1_ELBE_FILE("/sinfo/flowdepthtkh/sinfo_tkh_01.csv"), // |
38 TKH_2_RHEIN_FILE("/sinfo/flowdepthtkh/sinfo_tkh_02.csv"); | 39 TKH_2_RHEIN_FILE("/sinfo/flowdepthtkh/sinfo_tkh_02.csv"), |
40 | |
41 TKH_TKH_RHEIN_FILE("/sinfo/tkh/sinfo_tkh_export.csv"); | |
39 | 42 |
40 private final String filename; | 43 private final String filename; |
41 | 44 |
42 FilenameMapper(final String filename) { | 45 FilenameMapper(final String filename) { |
43 this.filename = filename; | 46 this.filename = filename; |
50 | 53 |
51 private final Boolean overrideFileExport() { | 54 private final Boolean overrideFileExport() { |
52 return null; | 55 return null; |
53 } | 56 } |
54 | 57 |
55 /* DO NOT DELETE FLOWDEPTH MIN MAX -used to work */ | 58 /* FLOWDEPTH MIN MAX */ |
56 // @Test | 59 @Test |
57 // public void testFTMINMAX1() throws ServerException, IOException { | 60 public void testFTMINMAX1() throws ServerException, IOException { |
58 // | 61 |
59 // RunnerCreatorHelper.createSinfoFlowdepthMinMaxTest(FilenameMapper.FT_MINMAX_RHEIN_1_FILE, 430, 450, River.Rhein) | 62 RunnerCreatorHelper.createSinfoFlowdepthMinMaxTest(FilenameMapper.FT_MINMAX_RHEIN_1_FILE, 430, 450, River.Rhein, |
60 // .runTest(overrideFileExport() != null ? overrideFileExport() : true); | 63 new SimpleRecommendation("bedheight", "bedheight-single-79-2004-MW-DGM-2004_Epoche_NHN", "longitudinal_section"), |
61 // } | 64 new SimpleRecommendation("staticwqkms", "additionals-wstv-0-269", "longitudinal_section", "Amtl.Festlegung_GlQ(2002)") |
62 // | 65 |
63 // @Test | 66 ).runTest(overrideFileExport() != null ? overrideFileExport() : true); |
64 // public void testFTMINMAX2() throws ServerException, IOException { | 67 } |
65 // | 68 |
66 // RunnerCreatorHelper.createSinfoFlowdepthMinMaxTest(FilenameMapper.FT_MINMAX_ELBE_2_FILE, 0, 90, River.Elbe) | 69 @Test |
67 // .runTest(overrideFileExport() != null ? overrideFileExport() : true); | 70 public void testFTMINMAX2() throws ConnectionException, ServerException, IOException { |
68 // } | 71 RunnerCreatorHelper.createSinfoFlowdepthMinMaxTest(FilenameMapper.FT_MINMAX_ELBE_2_FILE, 0, 90, River.Elbe, |
69 // | 72 // first |
70 /* DO NOT DELETE FLOWDEPTH - used to work */ | 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 */ | |
71 @Test | 83 @Test |
72 public void testRhein1FT() throws ConnectionException, ServerException, IOException { | 84 public void testRhein1FT() throws ConnectionException, ServerException, IOException { |
73 | 85 |
74 RunnerCreatorHelper | 86 RunnerCreatorHelper.createSinfoFlowdepthTest(FilenameMapper.FT_RHEIN_1_FILE, 350, 380, River.Rhein, false, |
75 .createSinfoFlowdepthTest(FilenameMapper.FT_RHEIN_1_FILE, 350, 380, River.Rhein, false, | 87 |
76 new SimpleRecommendation("staticwqkms", "additionals-wstv-0-415", "longitudinal_section"), | 88 new SimpleRecommendation("bedheight", "bedheight-soundings-79-2004-DGM-2004_Epoche_NHN", "longitudinal_section"), |
77 new SimpleRecommendation("bedheight", "bedheight-soundings-79-2004-DGM-2004_Epoche_NHN", "longitudinal_section")) | 89 new SimpleRecommendation("staticwqkms", "additionals-wstv-0-415", "longitudinal_section")) |
78 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | 90 .runTest(overrideFileExport() != null ? overrideFileExport() : true); |
79 | 91 |
80 } | 92 } |
81 | 93 |
82 @Test | 94 @Test |
83 public void testRhein2FT() throws ConnectionException, ServerException, IOException { | 95 public void testRhein2FT() throws ConnectionException, ServerException, IOException { |
84 RunnerCreatorHelper | 96 RunnerCreatorHelper |
85 .createSinfoFlowdepthTest(FilenameMapper.FT_RHEIN_2_FILE, 655, 675, River.Rhein, true, | 97 .createSinfoFlowdepthTest(FilenameMapper.FT_RHEIN_2_FILE, 655, 675, River.Rhein, true, |
86 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-323", "longitudinal_section"), | 98 new SimpleRecommendation("bedheight", "bedheight-soundings-92-2004-NIEDERRHEIN_QP-2004_Epoche_NHN", "longitudinal_section"), |
87 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 | |
88 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | 101 .runTest(overrideFileExport() != null ? overrideFileExport() : true); |
89 } | 102 } |
90 | 103 |
91 /* DO NOT DELETE FLOWDEPTH DEVELOPMENT - used to work */ | 104 /* FLOWDEPTH DEVELOPMENT */ |
92 | 105 |
93 // @Test | 106 @Test |
94 // public void testElbeFTE() throws ConnectionException, ServerException, IOException { | 107 public void testElbeFTE() throws ConnectionException, ServerException, IOException { |
95 // RunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(FilenameMapper.FTE_ELBE_FILE, 210, 230, River.Elbe, | 108 RunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(FilenameMapper.FTE_ELBE_FILE, 210, 230, River.Elbe, |
96 // // current | 109 // current |
97 // new SimpleRecommendation("staticwqkms", "fixations-wstv-0-196", "longitudinal_section", "05.05.2008"), // sicher | 110 new SimpleRecommendation("bedheight", "bedheight-soundings-66-2008-FP-QP-2008", |
98 // new SimpleRecommendation("bedheight", "bedheight-soundings-66-2008-FP-QP-2008", | 111 // "bedheight-single-66-2008-MW-FP-QP-2008", |
99 // // "bedheight-single-66-2008-MW-FP-QP-2008", | 112 "longitudinal_section"), |
100 // "longitudinal_section"), | 113 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-196", "longitudinal_section", "05.05.2008"), // sicher |
101 // | |
102 // // historical | |
103 // new SimpleRecommendation("staticwqkms", "fixations-wstv-0-186", "longitudinal_section", "18.03.1997"), // sicher | |
104 // new SimpleRecommendation("bedheight", "bedheight-soundings-70-1995-QP-1995", | |
105 // // "bedheight-single-70-1995-MW-QP-1995", | |
106 // "longitudinal_section")) | |
107 // .runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
108 // } | |
109 // | |
110 // @Test | |
111 // public void testRheinFTE() throws ConnectionException, ServerException, IOException { | |
112 // RunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(FilenameMapper.FTE_RHEIN_FILE, 655, 665, River.Rhein, | |
113 // // current | |
114 // new SimpleRecommendation("staticwqkms", "fixations-wstv-0-372", "longitudinal_section", "23.09.2009-1"), // sicher | |
115 // new SimpleRecommendation("bedheight", "bedheight-single-94-2008-MW-NIEDERRHEIN_QP-2008_Epoche_NHN", | |
116 // // "bedheight-single....", | |
117 // "longitudinal_section"), | |
118 // | |
119 // // historical | |
120 // new SimpleRecommendation("staticwqkms", "fixations-wstv-0-374", "longitudinal_section", "23.09.1991"), // sicher | |
121 // new SimpleRecommendation("bedheight", "bedheight-single-89-1991-MW-NIEDERRHEIN_QP-1991_Epoche_NHN", | |
122 // // "bedheight-soundings-89-1991-NIEDERRHEIN_QP-1991_Epoche_NHN", | |
123 // "longitudinal_section")) | |
124 // .runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
125 // } | |
126 | 114 |
127 /* TKH - works */ | 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 } | |
128 | 122 |
129 // @Test | 123 @Test |
130 // public void testElbeTKH_1() throws ConnectionException, ServerException, IOException { | 124 public void testRheinFTE() throws ConnectionException, ServerException, IOException { |
131 // RunnerCreatorHelper.createSinfoTkhTest(FilenameMapper.TKH_1_ELBE_FILE, 150, 160, River.Elbe, new double[] { 1520.0 }) | 125 RunnerCreatorHelper.createSinfoFlowdepthDevelopmentTest(FilenameMapper.FTE_RHEIN_FILE, 655, 665, River.Rhein, |
132 // .runTest(overrideFileExport() != null ? overrideFileExport() : true); | 126 // current |
133 // } | 127 new SimpleRecommendation("bedheight", "bedheight-single-94-2008-MW-NIEDERRHEIN_QP-2008_Epoche_NHN", |
134 // | 128 // "bedheight-single....", |
135 // @Test | 129 "longitudinal_section"), |
136 // public void testRheinTKH_2() throws ConnectionException, ServerException, IOException { | 130 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-372", "longitudinal_section", "23.09.2009-1"), // sicher |
137 // RunnerCreatorHelper.createSinfoTkhTest(FilenameMapper.TKH_2_RHEIN_FILE, 600, 610, River.Rhein, new double[] { 6125, | 131 |
138 // 6526 }) | 132 // historical |
139 // | 133 new SimpleRecommendation("bedheight", "bedheight-single-89-1991-MW-NIEDERRHEIN_QP-1991_Epoche_NHN", |
140 // .runTest(overrideFileExport() != null ? overrideFileExport() : true); | 134 // "bedheight-soundings-89-1991-NIEDERRHEIN_QP-1991_Epoche_NHN", |
141 // } | 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 } | |
142 | 159 |
143 } | 160 } |