comparison gwt-client/src/test/java/test/sinfo/SinfoFloodDurationRunner.java @ 9567:86e522bc7f36

jUnit-Tests completed
author gernotbelger
date Mon, 05 Nov 2018 13:21:57 +0100
parents e567fac95e3d
children 531a60b7af95
comparison
equal deleted inserted replaced
9566:9826b465b751 9567:86e522bc7f36
19 import org.dive4elements.river.client.shared.model.StringOptionsData; 19 import org.dive4elements.river.client.shared.model.StringOptionsData;
20 20
21 import test.AbstractBerechnungsartenTester.River; 21 import test.AbstractBerechnungsartenTester.River;
22 import test.AbstractModuleRunner; 22 import test.AbstractModuleRunner;
23 import test.ICalcMode; 23 import test.ICalcMode;
24 import test.IFilenameMapper;
25 import test.WQInputHelper; 24 import test.WQInputHelper;
26 import test.sinfo.SinfoFloodDurationRiversideChoice.RiversideChoiceKey; 25 import test.sinfo.SinfoFloodDurationRiversideChoice.RiversideChoiceKey;
27 26
28 /** 27 /**
29 * @author Domenico Nardi Tironi 28 * @author Domenico Nardi Tironi
33 32
34 private final double[] wasserspiegellage; 33 private final double[] wasserspiegellage;
35 private final boolean showWspl; 34 private final boolean showWspl;
36 private final RiversideChoiceKey riverside; 35 private final RiversideChoiceKey riverside;
37 36
38 public SinfoFloodDurationRunner(final ICalcMode calcmode, final IFilenameMapper file, final double from, final double to, final River river, 37 public SinfoFloodDurationRunner(final ICalcMode calcmode, final double from, final double to, final River river, final double[] wasserspiegellage,
39 final double[] wasserspiegellage, final RiversideChoiceKey riverside, final boolean showWspl) throws ConnectionException, ServerException { 38 final RiversideChoiceKey riverside, final boolean showWspl) throws ConnectionException, ServerException {
40 super(AbstractModuleRunner.Infotype.sinfo, calcmode, file, from, to, river); 39 super(AbstractModuleRunner.Infotype.sinfo, calcmode, from, to, river);
41 this.wasserspiegellage = wasserspiegellage; 40 this.wasserspiegellage = wasserspiegellage;
42 this.showWspl = showWspl; 41 this.showWspl = showWspl;
43 this.riverside = riverside; 42 this.riverside = riverside;
44 } 43 }
45 44
46 @Override 45 @Override
47 public void runTest(final boolean exportToFile) throws ServerException, IOException { 46 public void runTest() throws ServerException, IOException {
48 /* Select River */ 47 /* Select River */
49 super.selectRiver(); 48 super.selectRiver();
50 49
51 /* Select ICalcMode */ 50 /* Select ICalcMode */
52 super.selectCalcMode(); 51 super.selectCalcMode();
62 feedAndGo(new Data[] { riversideData }, 0); 61 feedAndGo(new Data[] { riversideData }, 0);
63 62
64 final Data showWsplData = new StringOptionsData("wspl", "wspl", new DataItem[] { new DefaultDataItem("wspl", "wspl", String.valueOf(this.showWspl)) }); 63 final Data showWsplData = new StringOptionsData("wspl", "wspl", new DataItem[] { new DefaultDataItem("wspl", "wspl", String.valueOf(this.showWspl)) });
65 feedAndGo(new Data[] { showWsplData }, 0); 64 feedAndGo(new Data[] { showWsplData }, 0);
66 65
67 final WQInputHelper helper = new WQInputHelper(this.wasserspiegellage); 66 if (this.showWspl) {
68 super.feedAndGo(helper.getDataforFeed(), // 67 final WQInputHelper helper = new WQInputHelper(this.wasserspiegellage);
69 0);// reachable state index 68 super.feedAndGo(helper.getDataforFeed(), //
69 0);// reachable state index
70 }
70 71
71 describeCollection(); 72 describeCollection();
72 73
73 super.export(exportToFile); 74 super.runTests();
74 } 75 }
75 } 76 }

http://dive4elements.wald.intevation.org