diff gwt-client/src/test/java/test/SinfoFlowdepthMinMaxRunner.java @ 9148:48d87af1243e

Unit testing flowdepthdevelopment added
author gernotbelger
date Tue, 12 Jun 2018 15:04:40 +0200
parents af73fdd96920
children
line wrap: on
line diff
--- a/gwt-client/src/test/java/test/SinfoFlowdepthMinMaxRunner.java	Tue Jun 12 10:40:33 2018 +0200
+++ b/gwt-client/src/test/java/test/SinfoFlowdepthMinMaxRunner.java	Tue Jun 12 15:04:40 2018 +0200
@@ -10,6 +10,8 @@
 package test;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException;
 import org.dive4elements.river.client.shared.exceptions.ServerException;
@@ -22,11 +24,17 @@
  * @author Domenico Nardi Tironi
  *
  */
-public class SinfoFlowdepthMinMaxRunner extends ModuleRunner {
+public class SinfoFlowdepthMinMaxRunner extends AbstractModuleRunner {
+
+    private final List<String> pairIds = new ArrayList<String>();
 
     public SinfoFlowdepthMinMaxRunner(final String username, final String password, final CalcMode sinfoCalcFlowDepthMinmax,
             final FilenameMapper helloWorldFile, final double from, final double to, final River beispielfluss) throws ConnectionException, ServerException {
-        super(username, password, ModuleRunner.Infotype.sinfo, sinfoCalcFlowDepthMinmax, helloWorldFile, from, to, beispielfluss);
+        super(username, password, AbstractModuleRunner.Infotype.sinfo, sinfoCalcFlowDepthMinmax, helloWorldFile, from, to, beispielfluss);
+    }
+
+    public void addRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException {
+        this.pairIds.add(super.getRecommendationPairString(rec1, rec2));
     }
 
     @Override
@@ -42,7 +50,7 @@
         super.selectRange();
 
         /* Select Fixpunkte */
-        feedAndGo(super.getPairData(), 0);
+        feedAndGo(extractPairData(this.pairIds, "diffids"), 0);
 
         // Describe collection
         describeCollection(); // wichtig, damit die Facets erzeugt werden

http://dive4elements.wald.intevation.org