Mercurial > dive4elements > river
diff gwt-client/src/test/java/test/AbstractModuleRunner.java @ 9422:e567fac95e3d
uinfo salix no scenario jUnit test
author | gernotbelger |
---|---|
date | Fri, 17 Aug 2018 11:43:42 +0200 |
parents | dba14da43f23 |
children | da19f1f58d72 |
line wrap: on
line diff
--- a/gwt-client/src/test/java/test/AbstractModuleRunner.java Fri Aug 17 09:41:40 2018 +0200 +++ b/gwt-client/src/test/java/test/AbstractModuleRunner.java Fri Aug 17 11:43:42 2018 +0200 @@ -51,9 +51,7 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; -import test.BerechnungsartenTester.CalcMode; -import test.BerechnungsartenTester.FilenameMapper; -import test.BerechnungsartenTester.River; +import test.AbstractBerechnungsartenTester.River; /** * @author Domenico Nardi Tironi @@ -62,9 +60,13 @@ public abstract class AbstractModuleRunner { public enum Infotype { - sinfo + sinfo, uinfo, bundu } + private final static String USERNAME = "belger"; + + private final static String PASSWORD = "belger"; + private static final String lineSeparator = System.getProperty("line.separator"); private final String serverUrl = "http://localhost:8181"; @@ -76,31 +78,27 @@ private static final String IGNORE_FLYS_VERSION = "# FLYS-Version:"; private static final String IGNORE_BEARBEITER = "NEIN_DOCH_NICHT";// "# Bearbeiter:"; - private final String username; - private final String password; private final Infotype infotype; private final String userUuid; private Collection collection; private Artifact artifact; - private final FilenameMapper fileName; + private final IFilenameMapper fileName; // common attributes - private final CalcMode calcMode; + private final ICalcMode iCalcMode; private final double from; private final double to; private final River river; - public AbstractModuleRunner(final String username, final String password, final Infotype infotype, final CalcMode sinfoCalcFlowDepth, - final FilenameMapper helloWorldFile, final double from, final double to, final River beispielfluss) throws ConnectionException, ServerException { + public AbstractModuleRunner(final Infotype infotype, final ICalcMode calcmode, final IFilenameMapper helloWorldFile, final double from, final double to, + final River beispielfluss) throws ConnectionException, ServerException { // common attributes (evtl. doch in subklassen, evtl. Zwischenhierarchiestufe einführen - this.calcMode = sinfoCalcFlowDepth; + this.iCalcMode = calcmode; this.river = beispielfluss; this.from = from; this.to = to; - this.username = username; - this.password = password; this.infotype = infotype; this.fileName = helloWorldFile; @@ -112,7 +110,7 @@ } private String makeUserUuid() throws ConnectionException { - final User user = new DefaultUser(this.username, this.password, null, false, new ArrayList<String>(), new ArrayList<String>()); + final User user = new DefaultUser(this.USERNAME, this.PASSWORD, null, false, new ArrayList<String>(), new ArrayList<String>()); final UserClient userClient = new UserClient(this.serverUrl); Element userElement; @@ -306,8 +304,8 @@ protected final void selectCalcMode() throws ConnectionException, ServerException { - /* Select CalcMode */ - final String calcmodeStr = this.calcMode.name(); + /* Select ICalcMode */ + final String calcmodeStr = this.iCalcMode.toString(); final Data dataCalcMode = new StringOptionsData("calculation_mode", "calculation_mode", new DataItem[] { new DefaultDataItem(calcmodeStr, calcmodeStr, calcmodeStr) }); feedAndGo(new Data[] { dataCalcMode }, 0);