Commit 07a4842e authored by Alexander Sommer's avatar Alexander Sommer

Merge branch 'manual-tests' into 'development'

Added medal tests

See merge request WS-17-18/assignment-tests!50
parents ada7c4f6 57d6dff2
......@@ -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
*/
......
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
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