Commit c8a36077 authored by ungpk's avatar ungpk
Browse files

add olympic-medal-table corner case

parent de60a142
package final_assignment.task_2.tests;
import final_assignment.task_2.Assignment2TestBase;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
/**
* For small corner case tests
* please add the io file into data/corner_cases and add a new test method for more tests
*/
public class CornerCases extends Assignment2TestBase {
/**
* Tests if olympic-medal-table only lists nations which took part in some competition,
* but lists these which didn't win any medal
*/
@Test
@DisplayName("medal-table")
void medalTable() {
testWithIOFile(getDataFolderDirectory() + "corner_cases/medal_table.io");
}
}
Tests if olympic-medal-table only lists nations which took part in some competition,
but lists these which didn't win any medal
> add-admin vorname;nachname;tester;123123123
OK
> login-admin tester;123123123
OK
> add-ioc-code 001;can;canada;2000
OK
> add-ioc-code 002;den;denmark;2000
OK
> add-olympic-sport fencing;fencing
OK
> add-athlete 0001;alex;edwin;canada;fencing;fencing
OK
> add-athlete 0002;benjamin;maria;denmark;fencing;fencing
OK
> add-competition 0001;2002;canada;fencing;fencing;0;0;0
OK
> olympic-medal-table
(1,001,can,canada,0,0,0,0)
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