Commit 5241c242 authored by jon.fehling's avatar jon.fehling
Browse files

added competition test

parent 0b182f7f
......@@ -15,10 +15,10 @@ public class CaseCreator {
private static final Random random = new Random();
private static long rgenseed = System.currentTimeMillis();
private static final int nCountries = 20;
private static final int nSports = 4;
private static final int nAthletes = 2300; //nAthletes*nSports<10000
private static final int nCompetitions = 200000;
private static final int nCountries = 10;
private static final int nSports = 1;
private static final int nAthletes = 20; //nAthletes*nSports<10000
private static final int nCompetitions = 20;
public static void main(String args[]) {
Terminal.isTest = true;
......
......@@ -40,4 +40,14 @@ class IOTestsWithError extends Assignment2TestBase {
void athleteTests() {
testWithIOFile(getDataFolderDirectory() + "athlete_tests.io");
}
/**
* Tests the creation of athletes
*/
@Test
@DisplayName("competition-tests")
void competitionTests() {
testWithIOFile(getDataFolderDirectory() + "competition_tests.io");
}
}
Automatically created test with seed 1519896448306
> add-admin Vorname;Nachname;tester;123123123
OK
> login-admin tester;123123123
OK
> add-ioc-code 818;qdn;bkwrhritty;2000
OK
> add-ioc-code 683;zbs;boqrrcngxx;2000
OK
> add-ioc-code 827;mdw;iunmgurgdb;2000
OK
> add-ioc-code 172;nrr;bfglsocdjv;2000
OK
> add-ioc-code 537;ewo;cyvlldijdc;2000
OK
> add-ioc-code 742;gzr;inmbuucrky;2000
OK
> add-ioc-code 719;icf;qkibhfreia;2000
OK
> add-ioc-code 734;mij;xkgezgcywo;2000
OK
> add-ioc-code 677;bsr;lrcobcmmhj;2000
OK
> add-ioc-code 319;qie;hugfleibgj;2000
OK
> add-olympic-sport hslbxb;mhzbtx
OK
> add-athlete 1605;cbvdmlcjyn;kjjhvocbyg;cyvlldijdc;hslbxb;mhzbtx
OK
> add-athlete 3115;eoyixyibar;rvazibzxiz;bkwrhritty;hslbxb;mhzbtx
OK
> add-athlete 2962;qqjhnmukdj;mndkfubigl;qkibhfreia;hslbxb;mhzbtx
OK
> add-athlete 8084;bdvbkcs tn;cmanqbml h;bfglsocdjv;hslbxb;mhzbtx
OK
> add-athlete 1453; lyuiqg qm;ydfo lkvmm;cyvlldijdc;hslbxb;mhzbtx
OK
> add-athlete 9246;itkbmyuauz;qbw tkufgl;lrcobcmmhj;hslbxb;mhzbtx
OK
> add-athlete 0072;sbedhfucxn;bgblglbjrr;bfglsocdjv;hslbxb;mhzbtx
OK
> add-athlete 3852;zelujrxjjz;ujeeusr ck;iunmgurgdb;hslbxb;mhzbtx
OK
> add-athlete 0214; lcxcfwe ;ckdjrwsewi;bfglsocdjv;hslbxb;mhzbtx
OK
> add-athlete 7632;iaxhcqbnof;kyihosajcl;hugfleibgj;hslbxb;mhzbtx
OK
> add-athlete 6664;kzwzxwustu;tdltdavxag;cyvlldijdc;hslbxb;mhzbtx
OK
> add-athlete 2484;rgrsx nc w;rsebwqsnyf;inmbuucrky;hslbxb;mhzbtx
OK
> add-athlete 1559;lrdqgmokqa;oziakgfikc;lrcobcmmhj;hslbxb;mhzbtx
OK
> add-athlete 6789;xifmeaizrb;ehwebmkhoi;inmbuucrky;hslbxb;mhzbtx
OK
> add-athlete 4401;mh uwdbbbe;ejoihevizd;iunmgurgdb;hslbxb;mhzbtx
OK
> add-athlete 2605;j znotafy;cbsvwzzmsd;inmbuucrky;hslbxb;mhzbtx
OK
> add-athlete 2715;vmbcww rzb;cfuaq oaqk;lrcobcmmhj;hslbxb;mhzbtx
OK
> add-athlete 4913;mkrzokbkcw;ybnzmkcvdb;qkibhfreia;hslbxb;mhzbtx
OK
> add-athlete 9142;objkfzvmjn;jn fbrxqtf;inmbuucrky;hslbxb;mhzbtx
OK
> add-athlete 3376;dytvdjjuvw;ljoijbfhjb;bfglsocdjv;hslbxb;mhzbtx
OK
> add-competition 8084;2010;bfglsocdjv;hslbxb;mhzbtx;0;1;0
OK
> add-competition 2715;1994;lrcobcmmhj;hslbxb;mhzbtx;0;1;0
OK
> add-competition 3376;1998;bfglsocdjv;hslbxb;mhzbtx;0;0;1
OK
> add-competition 4913;2006;qkibhfreia;hslbxb;mhzbtx;0;1;0
OK
> add-competition 0072;1994;bfglsocdjv;hslbxb;mhzbtx;0;0;1
OK
> add-competition 3115;1950;bkwrhritty;hslbxb;mhzbtx;1;0;0
OK
> add-competition 1605;1986;cyvlldijdc;hslbxb;mhzbtx;0;1;0
OK
> add-competition 1559;1950;lrcobcmmhj;hslbxb;mhzbtx;0;0;1
OK
> add-competition 8084;1990;bfglsocdjv;hslbxb;mhzbtx;0;1;0
OK
> add-competition 2484;1982;inmbuucrky;hslbxb;mhzbtx;0;0;1
OK
> add-competition 4401;1942;iunmgurgdb;hslbxb;mhzbtx;0;1;0
OK
> add-competition 2484;1946;inmbuucrky;hslbxb;mhzbtx;0;1;0
OK
> add-competition 2962;1974;qkibhfreia;hslbxb;mhzbtx;0;0;1
OK
> add-competition 2484;1946;inmbuucrky;hslbxb;mhzbtx;0;1;0
Error, athlete 2484 already got a medal for hslbxb mhzbtx in year 1946.
> add-competition 4913;1978;qkibhfreia;hslbxb;mhzbtx;0;0;1
OK
> add-competition 3115;1938;bkwrhritty;hslbxb;mhzbtx;0;1;0
OK
> add-competition 9142;1954;inmbuucrky;hslbxb;mhzbtx;0;1;0
OK
> add-competition 9246;1950;lrcobcmmhj;hslbxb;mhzbtx;0;1;0
OK
> add-competition 1453;2002;cyvlldijdc;hslbxb;mhzbtx;0;1;0
OK
> add-competition 0214;1998;bfglsocdjv;hslbxb;mhzbtx;0;1;0
OK
> list-olympic-sports
hslbxb mhzbtx
> summary-athletes mhzbtx
2484 rgrsx nc w rsebwqsnyf 2
3115 eoyixyibar rvazibzxiz 2
4913 mkrzokbkcw ybnzmkcvdb 2
8084 bdvbkcs tn cmanqbml h 2
0072 sbedhfucxn bgblglbjrr 1
0214 lcxcfwe ckdjrwsewi 1
1453 lyuiqg qm ydfo lkvmm 1
1559 lrdqgmokqa oziakgfikc 1
1605 cbvdmlcjyn kjjhvocbyg 1
2715 vmbcww rzb cfuaq oaqk 1
2962 qqjhnmukdj mndkfubigl 1
3376 dytvdjjuvw ljoijbfhjb 1
4401 mh uwdbbbe ejoihevizd 1
9142 objkfzvmjn jn fbrxqtf 1
9246 itkbmyuauz qbw tkufgl 1
2605 j znotafy cbsvwzzmsd 0
3852 zelujrxjjz ujeeusr ck 0
6664 kzwzxwustu tdltdavxag 0
6789 xifmeaizrb ehwebmkhoi 0
7632 iaxhcqbnof kyihosajcl 0
> olympic-medal-table
(1,818,qdn,bkwrhritty,1,1,0,2)
(2,172,nrr,bfglsocdjv,0,3,2,5)
(3,677,bsr,lrcobcmmhj,0,2,1,3)
(4,742,gzr,inmbuucrky,0,2,1,3)
(5,537,ewo,cyvlldijdc,0,2,0,2)
(6,719,icf,qkibhfreia,0,1,2,3)
(7,827,mdw,iunmgurgdb,0,1,0,1)
(8,319,qie,hugfleibgj,0,0,0,0)
(9,683,zbs,boqrrcngxx,0,0,0,0)
(10,734,mij,xkgezgcywo,0,0,0,0)
Supports Markdown
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