view gwt-client/src/test/java/test/sinfo/SinfoFlowdepthDevelopmentRunner.java @ 9567:86e522bc7f36

jUnit-Tests completed
author gernotbelger
date Mon, 05 Nov 2018 13:21:57 +0100
parents e567fac95e3d
children 531a60b7af95
line wrap: on
line source
/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
 * Software engineering by
 *  Björnsen Beratende Ingenieure GmbH
 *  Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
 *
 * This file is Free Software under the GNU AGPL (>=v3)
 * and comes with ABSOLUTELY NO WARRANTY! Check out the
 * documentation coming with Dive4Elements River for details.
 */
package test.sinfo;

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;

import test.AbstractBerechnungsartenTester.River;
import test.AbstractModuleRunner;
import test.ICalcMode;
import test.SimpleRecommendation;

/**
 * @author Domenico Nardi Tironi
 *
 */
final class SinfoFlowdepthDevelopmentRunner extends AbstractModuleRunner {

    private final List<String> pairIdsCurrent = new ArrayList<String>();
    private final List<String> pairIdsHistorical = new ArrayList<String>();

    public SinfoFlowdepthDevelopmentRunner(final ICalcMode sinfoCalcFlowDepth, final double from, final double to, final River river)
            throws ConnectionException, ServerException {
        super(AbstractModuleRunner.Infotype.sinfo, sinfoCalcFlowDepth, from, to, river);

    }

    public void addCurrentRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException {
        this.pairIdsCurrent.add(super.getRecommendationPairString(rec1, rec2));
    }

    public void addHistoricalRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException {
        this.pairIdsHistorical.add(super.getRecommendationPairString(rec1, rec2));
    }

    @Override
    public void runTest() throws ServerException, IOException {
        /* Select River */
        super.selectRiver();

        /* Select ICalcMode */
        super.selectCalcMode();

        /* Select Range */
        super.selectRange();

        /* Select current Fixpunkte */
        feedAndGo(super.extractPairData(this.pairIdsCurrent, "diffid_current"), 0);

        /* Select historical Fixpunkte */
        feedAndGo(super.extractPairData(this.pairIdsHistorical, "diffid_historical"), 0);

        describeCollection();

        super.runTests();
    }
}

http://dive4elements.wald.intevation.org