view gwt-client/src/test/java/test/RunnerCreatorHelper.java @ 9127:dbb26bc81843

Testing
author gernotbelger
date Wed, 06 Jun 2018 13:05:57 +0200
parents
children af73fdd96920
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;

import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException;
import org.dive4elements.river.client.shared.exceptions.ServerException;

import test.BerechnungsartenTester.CalcMode;
import test.BerechnungsartenTester.FilenameMapper;
import test.BerechnungsartenTester.River;

/**
 * @author Domenico Nardi Tironi
 *
 */
public class RunnerCreatorHelper {

    private final static String user = "belger";
    private final static String pw = "belger";

    public RunnerCreatorHelper() {

    }

    // HELPER-Methods:

    public final static ModuleRunner createSinfoFlowdepthMinMaxTest(final FilenameMapper helloWorldFile, final double from, final double to,
            final River beispielfluss) throws ConnectionException, ServerException {
        // TODO: make recommendationPair to method parameter if needed
        final ModuleRunner proof = new SinfoFlowdepthMinMaxRunner(user, pw, CalcMode.sinfo_calc_flow_depth_minmax, helloWorldFile, from, to, beispielfluss);
        proof.addRecommendationPair(new SimpleRecommendation("staticwqkms", "additionals-wstv-0-103", "sinfo_flowdepth_waterlevels"),
                new SimpleRecommendation("bedheight", "bedheight-single-36-2015-FP-2015_0-502", "sinfo_flowdepthminmax_heights"));

        return proof;
    }

    public final static ModuleRunner createSinfoFlowdepthTest(final FilenameMapper file, final double from, final double to, final River river,
            final boolean useTkh, final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException {
        final ModuleRunner proof = new SinfoFlowdepthTest(user, pw, CalcMode.sinfo_calc_flow_depth, file, from, to, river, useTkh);
        proof.addRecommendationPair(rec0, rec1);

        return proof;
    }

}

http://dive4elements.wald.intevation.org