Mercurial > dive4elements > river
annotate gwt-client/src/test/java/test/BerechnungsartenTester.java @ 9133:af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
author | gernotbelger |
---|---|
date | Thu, 07 Jun 2018 11:41:10 +0200 |
parents | dbb26bc81843 |
children | 48d87af1243e |
rev | line source |
---|---|
9031 | 1 package test; |
2 | |
3 /* | |
4 * Copyright (c) 2010 by Intevation GmbH | |
5 * | |
6 * This program is free software under the LGPL (>=v2.1) | |
7 * Read the file LGPL.txt coming with the software for details | |
8 * or visit http://www.gnu.org/licenses/ if it does not exist. | |
9 */ | |
10 | |
11 import java.io.IOException; | |
12 | |
9127 | 13 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; |
9031 | 14 import org.dive4elements.river.client.shared.exceptions.ServerException; |
9127 | 15 import org.junit.Test; |
9031 | 16 |
17 /** | |
18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
19 */ | |
20 | |
9127 | 21 // REMARK: ignored, because maven will auto-test all tests, but this one needs a running river-artifacts |
22 // For running the JUunit test, the annotation @Ignore has to be disabled | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
23 // @Ignore |
9127 | 24 public class BerechnungsartenTester { |
9031 | 25 |
9127 | 26 public static enum CalcMode { |
27 sinfo_calc_flow_depth, sinfo_calc_flow_depth_development, sinfo_calc_flow_depth_minmax, sinfo_calc_collision, Transportkörperhöhen, sinfo_calc_flood_duration | |
28 }; | |
29 | |
30 public static enum River { | |
31 Beispielfluss, Rhein | |
32 }; | |
33 | |
34 public static enum FilenameMapper { | |
35 | |
36 HELLO_WORLD_FILE("/sinfo/flowdepthminmax/sinfo_flowdepthminmax_export.csv"), // | |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
37 |
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
38 // Schäfer-Tests: |
9127 | 39 RHEIN_1_FILE("/sinfo/flowdepth/sinfo_ft_01.csv"), // |
9133
af73fdd96920
Title current/historical diff pair; limit on entries in diff'pair twin_panel
gernotbelger
parents:
9127
diff
changeset
|
40 RHEIN_3_FILE("/sinfo/flowdepth/sinfo_ft_03.csv"); // |
9127 | 41 |
42 private final String filename; | |
43 | |
44 FilenameMapper(final String filename) { | |
45 this.filename = filename; | |
46 } | |
47 | |
48 public String getFilename() { | |
49 return this.filename; | |
50 } | |
9031 | 51 } |
9127 | 52 |
53 private final Boolean overrideFileExport() { | |
54 return null; | |
55 } | |
56 | |
57 @Test | |
58 public void testHelloWorld() throws ServerException, IOException { | |
59 | |
60 /* Hello World Test */ | |
61 RunnerCreatorHelper.createSinfoFlowdepthMinMaxTest(FilenameMapper.HELLO_WORLD_FILE, 10, 100, River.Beispielfluss) | |
62 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
63 } | |
64 | |
65 @Test | |
66 public void testRhein1() throws ConnectionException, ServerException, IOException { | |
67 | |
68 RunnerCreatorHelper | |
69 .createSinfoFlowdepthTest(FilenameMapper.RHEIN_1_FILE, 350, 380, River.Rhein, false, | |
70 new SimpleRecommendation("staticwqkms", "additionals-wstv-0-415", "longitudinal_section"), | |
71 new SimpleRecommendation("bedheight", "bedheight-soundings-79-2004-DGM-2004_Epoche_NHN", "longitudinal_section")) | |
72 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
73 | |
74 } | |
75 | |
76 @Test | |
77 public void testRhein3() throws ConnectionException, ServerException, IOException { | |
78 RunnerCreatorHelper | |
79 .createSinfoFlowdepthTest(FilenameMapper.RHEIN_3_FILE, 655, 675, River.Rhein, true, | |
80 new SimpleRecommendation("staticwqkms", "fixations-wstv-0-323", "longitudinal_section"), | |
81 new SimpleRecommendation("bedheight", "bedheight-soundings-92-2004-NIEDERRHEIN_QP-2004_Epoche_NHN", "longitudinal_section")) | |
82 .runTest(overrideFileExport() != null ? overrideFileExport() : true); | |
83 } | |
84 | |
9049 | 85 } |