Commit d12afae9 authored by illya's avatar illya
Browse files

Add competition error tests

Add a test that tries to add a competition with a negative medal parameter.
parent 7c379d92
...@@ -19,4 +19,13 @@ public class ErrorTests extends Assignment2TestBase { ...@@ -19,4 +19,13 @@ public class ErrorTests extends Assignment2TestBase {
void adminErrors() { void adminErrors() {
testWithIOFile(getDataFolderDirectory() + "error_tests/admin.io"); testWithIOFile(getDataFolderDirectory() + "error_tests/admin.io");
} }
/**
* This tests competition functionality
*/
@Test
@DisplayName("competition")
void competitionErrors() {
testWithIOFile(getDataFolderDirectory() + "error_tests/add_competition.io");
}
} }
Trying to add negative number of medals
> add-admin vorname;nachname;tester;123123123
OK
> login-admin tester;123123123
OK
> add-olympic-sport eishockey;eishockey
OK
> add-ioc-code 111;arg;argentinien;1920
OK
> add-athlete 0001;max;mustermann;argentinien;eishockey;eishockey
OK
> add-competition 0001;2002;canada;eishockey;eishockey;-1;0;0
Error, wrong number of medals
\ 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