Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WS-17-18
assignment-tests
Commits
f326c8bc
Commit
f326c8bc
authored
Mar 01, 2018
by
Alexander Sommer
Browse files
Update DummyMain and remove String init
parents
e29165f3
114ee518
Changes
1
Show whitespace changes
Inline
Side-by-side
src/final_assignment/task_2/CaseCreator.java
View file @
f326c8bc
...
@@ -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
=
1
0
;
private
static
final
int
nCountries
=
2
0
;
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
=
2
0
;
private
static
final
int
nCompetitions
=
100
0
;
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
V
orname;
N
achname;tester;123123123"
,
"OK"
));
pairs
.
add
(
new
TestPair
(
"add-admin
v
orname;
n
achname;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
)
+
";"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment