Mercurial > dive4elements > river
diff gwt-client/src/test/java/test/bundu/BunduBerechnungsartenTester.java @ 9439:ce0a48b93f4b
bundu jUnit test first attempt
author | gernotbelger |
---|---|
date | Mon, 20 Aug 2018 16:57:25 +0200 |
parents | |
children | 173f188569c6 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gwt-client/src/test/java/test/bundu/BunduBerechnungsartenTester.java Mon Aug 20 16:57:25 2018 +0200 @@ -0,0 +1,63 @@ +package test.bundu; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.dive4elements.river.client.shared.exceptions.ServerException; +import org.junit.Test; + +import test.AbstractBerechnungsartenTester; +import test.ICalcMode; +import test.IFilenameMapper; + +//@Ignore +public class BunduBerechnungsartenTester extends AbstractBerechnungsartenTester { + + public static enum CalcMode implements ICalcMode { + bundu_bezugswst, // + // der Vollständigkeit halber + bundu_analysis, bundu_vollmer + }; + + public static enum FilenameMapper implements IFilenameMapper { + BEZUGSWST_FILE("/bundu/bezugswst/bezugswst.csv"); // + private final String filename; + + FilenameMapper(final String filename) { + this.filename = filename; + } + + @Override + public String getFilename() { + return this.filename; + } + } + + // FixChoice + // "state.bundu.wst.fix.auto" + // state.bundu.wst.fix.manual; + + // CalcChoice: + // state.bundu.wst.calc.manual + // state.bundu.wst.calc.auto + + // SOUNDINGS: SIehe ParameterMatrixPanel.getData + + @Test + public void testBezugswstAuto() throws ServerException, IOException { + final List<Segment> segments = new ArrayList<Segment>(); + segments.add(new Segment("Köln", 670., 703.3, 1090.)); + segments.add(new Segment("Düsseldorf", 703.3, 710., 1060.)); + + final int abflussklasseFrom = 0; + final int abflussklasseTo = 3; // TODO: Make map here + + final int[] events = new int[] { 1465, 1466, 1452, 1453, 1472, 1473, 1478, 1479, 1604, 1605, 1317, 1318, 1353, 1354, 1596, 1597, 1323, 1324, 1345, 1346, + 1330, 1331, 1458, 1459 }; // get ids by debugging FixCalculation line 73 (constructor) + + new BunduBezugswstRunner(FilenameMapper.BEZUGSWST_FILE, 670., 710., 100, River.Rhein, 2015, "state.bundu.wst.fix.auto", abflussklasseFrom, + abflussklasseTo, events, 10, segments, "state.bundu.wst.calc.auto", false, "single-95") + .runTest(overrideFileExport() != null ? overrideFileExport() : true); + } +} \ No newline at end of file