Commit f326c8bc authored by Alexander Sommer's avatar Alexander Sommer
Browse files

Update DummyMain and remove String init

parents e29165f3 114ee518
...@@ -15,10 +15,10 @@ public class CaseCreator { ...@@ -15,10 +15,10 @@ public class CaseCreator {
private static final Random random = new Random(); private static final Random random = new Random();
private static long rgenseed = System.currentTimeMillis(); private static long rgenseed = System.currentTimeMillis();
private static final int nCountries = 10; private static final int nCountries = 20;
private static final int nSports = 1; private static final int nSports = 4;
private static final int nAthletes = 20; //nAthletes*nSports<10000 private static final int nAthletes = 20; //nAthletes*nSports<10000
private static final int nCompetitions = 20; private static final int nCompetitions = 1000;
public static void main(String args[]) { public static void main(String args[]) {
Terminal.isTest = true; Terminal.isTest = true;
...@@ -36,7 +36,7 @@ public class CaseCreator { ...@@ -36,7 +36,7 @@ public class CaseCreator {
Terminal.OUT_TEST.clear(); Terminal.OUT_TEST.clear();
Vector<TestPair> pairs = new Vector<TestPair>(); Vector<TestPair> pairs = new Vector<TestPair>();
pairs.add(new TestPair("add-admin Vorname;Nachname;tester;123123123", "OK")); pairs.add(new TestPair("add-admin vorname;nachname;tester;123123123", "OK"));
pairs.add(new TestPair("login-admin tester;123123123", "OK")); pairs.add(new TestPair("login-admin tester;123123123", "OK"));
Vector<String> ids = new Vector<>(); Vector<String> ids = new Vector<>();
...@@ -109,9 +109,11 @@ public class CaseCreator { ...@@ -109,9 +109,11 @@ public class CaseCreator {
int medal = random.nextInt(3); int medal = random.nextInt(3);
String medalString = ""; String medalString = "";
if (medal == 0) medalString = "0;1;0"; if (medal == 0) medalString = "0;1;0";
if (medal == 1) medalString = "1;0;0"; if (medal == 1) medalString = "1;0;0";
if (medal == 2) medalString = "0;0;1"; if (medal == 2) medalString = "0;0;1";
if (medal == 3) medalString = "0;0;0";
pairs.add(new TestPair("add-competition " + athletes.elementAt(s).elementAt(indexAthlete) + ";" + (1926 + random.nextInt(24) * 4) + ";" pairs.add(new TestPair("add-competition " + athletes.elementAt(s).elementAt(indexAthlete) + ";" + (1926 + random.nextInt(24) * 4) + ";"
+ athletes.elementAt(s).elementAt(indexAthlete + 1) + ";" + athletes.elementAt(s).elementAt(indexAthlete + 1) + ";"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment