Mercurial > dive4elements > river
diff 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 diff
--- a/gwt-client/src/test/java/test/sinfo/SinfoRunnerCreatorHelper.java Mon Nov 05 13:51:47 2018 +0100 +++ b/gwt-client/src/test/java/test/sinfo/SinfoRunnerCreatorHelper.java Mon Nov 05 17:15:30 2018 +0100 @@ -9,6 +9,8 @@ */ package test.sinfo; +import java.io.File; + import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; import org.dive4elements.river.client.shared.exceptions.ServerException; @@ -30,52 +32,53 @@ // HELPER-Methods: - public final static AbstractModuleRunner createSinfoFlowdepthMinMaxTest(final double from, final double to, final River river, + 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(CalcMode.sinfo_calc_flow_depth_minmax, from, to, river); + 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 int from, final int to, final River river, + 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(from, to, river, simpleRecommendation0, + final SinfoFlowdepthMinMaxRunner proof = (SinfoFlowdepthMinMaxRunner) createSinfoFlowdepthMinMaxTest(testFolder, from, to, river, simpleRecommendation0, simpleRecommendation1); proof.addRecommendationPair(simpleRecommendation2, simpleRecommendation3); return proof; } - public final static AbstractModuleRunner createSinfoFlowdepthTest(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(CalcMode.sinfo_calc_flow_depth, from, to, river, useTkh); + 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 double from, final double to, final River river, + 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(CalcMode.sinfo_calc_flow_depth_development, from, to, river); + 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 double from, final double to, final River river, + 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(CalcMode.sinfo_calc_transport_bodies_heights, from, to, river, wasserspiegellage); + final SinfoTkhRunner proof = new SinfoTkhRunner(testFolder, CalcMode.sinfo_calc_transport_bodies_heights, from, to, river, wasserspiegellage); return proof; } - public final static AbstractModuleRunner createSinfoCollisionYearsTest(final double from, final double to, final River river, final int[] years) - throws ConnectionException, ServerException { - final SinfoCollisionRunner proof = new SinfoCollisionRunner(from, to, river, years, null) + 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) ; @@ -83,17 +86,17 @@ return proof; } - public final static AbstractModuleRunner createSinfoCollisionEpochsTest(final double from, final double to, final River river, final String epochs) - throws ConnectionException, ServerException { - final SinfoCollisionRunner proof = new SinfoCollisionRunner(from, to, river, null, epochs); + 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 double from, final double to, final River river, + 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(CalcMode.sinfo_calc_flood_duration, from, to, river, wasserspiegellage, riverside, - showWspl); + final SinfoFloodDurationRunner proof = new SinfoFloodDurationRunner(testFolder, CalcMode.sinfo_calc_flood_duration, from, to, river, wasserspiegellage, + riverside, showWspl); return proof; }