Skip to content
GitLab
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
07a4842e
Commit
07a4842e
authored
Mar 13, 2018
by
uhflp
Browse files
Merge branch 'manual-tests' into 'development'
Added medal tests See merge request WS-17-18/assignment-tests!50
parents
ada7c4f6
57d6dff2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/final_assignment/task_2/tests/IOTestsWithError.java
View file @
07a4842e
...
...
@@ -41,6 +41,16 @@ class IOTestsWithError extends Assignment2TestBase {
testWithIOFile
(
getDataFolderDirectory
()
+
"error_tests/athlete_tests.io"
);
}
/**
* Tests the creation of competitions and medals
*/
@Test
@DisplayName
(
"medal-tests"
)
void
medalTests
()
{
testWithIOFile
(
getDataFolderDirectory
()
+
"error_tests/medal_tests.io"
);
}
/**
* Tests the creation of athletes
*/
...
...
src/final_assignment/task_2/tests/data/error_tests/medal_tests.io
0 → 100644
View file @
07a4842e
Tests
competition
with
focus
on
medals
>
add
-
admin
Leon
;
Mustermann
;
leon
;
12345678
OK
>
login
-
admin
leon
;
12345678
OK
>
add
-
ioc
-
code
001
;
can
;
canada
;
2000
OK
>
add
-
ioc
-
code
123
;
ger
;
deutschland
;
1994
OK
>
add
-
olympic
-
sport
fencing
;
fencing
OK
>
add
-
olympic
-
sport
bobsport
;
bob
OK
>
add
-
athlete
0001
;
max
;
mustermann
;
deutschland
;
bobsport
;
bob
OK
>
add
-
competition
0001
;
2002
;
deutschland
;
fencing
;
fencing
;
1
;
0
;
0
Error
,
the
athlete
0001
,
max
mustermann
does
not
compete
in
fencing
,
fencing
>
add
-
competition
0001
;
2002
;
deutschland
;
bobsport
;
bob
;
1
;
1
;
0
Error
,
one
player
can
only
win
one
medal
at
a
competition
!
>
add
-
competition
0001
;
2002
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
0
OK
>
0001
;
2002
;
deutschland
;
bobsport
;
bob
;
1
;
1
;
0
Error
,
not
a
valid
command
!
>
add
-
competition
0000
;
2002
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
0
Error
,
An
Athlete
with
ID
0000
does
not
exist
.
>
add
-
competition
0001
;
2018
;
deutschland
;
bobsport
;
bob
;
0
;
2
;
0
Error
,
one
player
can
only
win
one
medal
at
a
competition
!
>
add
-
competition
0001
;
2002
;
deutschland
;
bobsport
;
bob
;
01
;
0
;
0
Error
,
not
a
valid
command
!
>
add
-
competition
0001
;
2002
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
2
Error
,
one
player
can
only
win
one
medal
at
a
competition
!
>
add
-
competition
0001
;
2002
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
0
Error
,
Competition
already
assigned
to
athlete
>
add
-
competition
0001
;
2002
;
deutschland
;
bobsport
;
bob
;
0
;
1
;
0
Error
,
Competition
already
assigned
to
athlete
>
add
-
competition
0001
;
2002
;
ger
;
bobsport
;
bob
;
1
;
0
;
0
Error
,
A
country
with
name
ger
does
not
exist
.
>
add
-
competition
0001
;
2002
;
deutschland
;
bobsport
;
1
;
0
;
0
Error
,
not
a
valid
command
!
>
add
-
competition
00001
;
2002
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
0
Error
,
not
a
valid
command
!
>
add
-
competition
0001
;
2022
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
0
Error
,
Year
out
of
range
.
>
add
-
competition
0201
;
2002
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
0
Error
,
An
Athlete
with
ID
0201
does
not
exist
.
>
add
-
competition
0001
;
2002
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
0
Error
,
Competition
already
assigned
to
athlete
>
add
-
athlete
0003
;
max
;
mustermann
;
deutschland
;
bobsport
;
bob
OK
>
list
-
olympic
-
sports
bobsport
bob
fencing
fencing
>
add
-
competition
0003
;
2018
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
0
OK
>
add
-
competition
0001
;
2018
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
0
OK
>
add
-
competition
0001
;
2018
;
deutschland
;
bobsport
;
bob
;
1
;
0
;
0
Error
,
Competition
already
assigned
to
athlete
>
add
-
competition
0001
;
2018
;
deutschland
;
bobsport
;
bob
;
0
;
0
;
0
Error
,
Competition
already
assigned
to
athlete
>
add
-
athlete
0002
;
alex
;
mustermann
;
deutschland
;
bobsport
;
bob
OK
>
add
-
competition
0002
;
2018
;
deutschland
;
bobsport
;
bob
;
0
;
1
;
0
OK
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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