Mercurial > dive4elements > river
view gwt-client/src/test/java/test/sinfo/SinfoRunnerCreatorHelper.java @ 9570:531a60b7af95
failed tests will be saved to disk
author | gernotbelger |
---|---|
date | Mon, 05 Nov 2018 17:15:30 +0100 |
parents | 86e522bc7f36 |
children |
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.File; import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; import org.dive4elements.river.client.shared.exceptions.ServerException; import test.AbstractBerechnungsartenTester.River; import test.AbstractModuleRunner; import test.SimpleRecommendation; import test.sinfo.SinfoBerechnungsartenTester.CalcMode; import test.sinfo.SinfoFloodDurationRiversideChoice.RiversideChoiceKey; /** * @author Domenico Nardi Tironi * */ final class SinfoRunnerCreatorHelper { private SinfoRunnerCreatorHelper() { throw new UnsupportedOperationException(); } // HELPER-Methods: public final static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final File testFolder, final double from, final double to, final River river, final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { // TODO: make recommendationPair to method parameter if needed final SinfoFlowdepthMinMaxRunner proof = new SinfoFlowdepthMinMaxRunner(testFolder, CalcMode.sinfo_calc_flow_depth_minmax, from, to, river); proof.addRecommendationPair(rec0, rec1); return proof; } public static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final File testFolder, final int from, final int to, final River river, final SimpleRecommendation simpleRecommendation0, final SimpleRecommendation simpleRecommendation1, final SimpleRecommendation simpleRecommendation2, final SimpleRecommendation simpleRecommendation3) throws ConnectionException, ServerException { final SinfoFlowdepthMinMaxRunner proof = (SinfoFlowdepthMinMaxRunner) createSinfoFlowdepthMinMaxTest(testFolder, from, to, river, simpleRecommendation0, simpleRecommendation1); proof.addRecommendationPair(simpleRecommendation2, simpleRecommendation3); return proof; } public final static AbstractModuleRunner createSinfoFlowdepthTest(final File testFolder, final double from, final double to, final River river, final boolean useTkh, final SimpleRecommendation rec0, final SimpleRecommendation rec1) throws ConnectionException, ServerException { final SinfoFlowdepthRunner proof = new SinfoFlowdepthRunner(testFolder, CalcMode.sinfo_calc_flow_depth, from, to, river, useTkh); proof.addRecommendationPair(rec0, rec1); return proof; } public final static AbstractModuleRunner createSinfoFlowdepthDevelopmentTest(final File testFolder, final double from, final double to, final River river, final SimpleRecommendation rec0_curr, final SimpleRecommendation rec1_curr, final SimpleRecommendation rec0_hist, final SimpleRecommendation rec1_hist) throws ConnectionException, ServerException { final SinfoFlowdepthDevelopmentRunner proof = new SinfoFlowdepthDevelopmentRunner(testFolder, CalcMode.sinfo_calc_flow_depth_development, from, to, river); proof.addCurrentRecommendationPair(rec0_curr, rec1_curr); proof.addHistoricalRecommendationPair(rec0_hist, rec1_hist); return proof; } public final static AbstractModuleRunner createSinfoTkhTest(final File testFolder, final double from, final double to, final River river, // final boolean useTkh, final double[] wasserspiegellage) throws ConnectionException, ServerException { final SinfoTkhRunner proof = new SinfoTkhRunner(testFolder, CalcMode.sinfo_calc_transport_bodies_heights, from, to, river, wasserspiegellage); return proof; } public final static AbstractModuleRunner createSinfoCollisionYearsTest(final File testFolder, final double from, final double to, final River river, final int[] years) throws ConnectionException, ServerException { final SinfoCollisionRunner proof = new SinfoCollisionRunner(testFolder, from, to, river, years, null) // .addOutputTest(file, outputModeName, overideWriteToDisk, // params) ; return proof; } public final static AbstractModuleRunner createSinfoCollisionEpochsTest(final File testFolder, final double from, final double to, final River river, final String epochs) throws ConnectionException, ServerException { final SinfoCollisionRunner proof = new SinfoCollisionRunner(testFolder, from, to, river, null, epochs); return proof; } public final static AbstractModuleRunner createSinfoFloodDurationTest(final File testFolder, final double from, final double to, final River river, final double[] wasserspiegellage, final boolean showWspl, final RiversideChoiceKey riverside) throws ConnectionException, ServerException { final SinfoFloodDurationRunner proof = new SinfoFloodDurationRunner(testFolder, CalcMode.sinfo_calc_flood_duration, from, to, river, wasserspiegellage, riverside, showWspl); return proof; } }