Tournament list #11
|
@ -82,7 +82,6 @@ class FileIOTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void loadTournamentNotExisting(){
|
void loadTournamentNotExisting(){
|
||||||
io = new FileIO(mainDir);
|
|
||||||
File file = new File("Not-existing-File");
|
File file = new File("Not-existing-File");
|
||||||
assertFalse(file.exists());
|
assertFalse(file.exists());
|
||||||
assertThrows(FileNotFoundException.class, () -> io.loadTournament(file));
|
assertThrows(FileNotFoundException.class, () -> io.loadTournament(file));
|
||||||
|
@ -91,13 +90,11 @@ class FileIOTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void loadTournamentEmpty(){
|
void loadTournamentEmpty(){
|
||||||
io = new FileIO(mainDir);
|
|
||||||
assertThrows(IOException.class, () -> io.loadTournament(new File(mainDir + "/saves/empty.txt")));
|
assertThrows(IOException.class, () -> io.loadTournament(new File(mainDir + "/saves/empty.txt")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void loadTournamentFileNull(){
|
void loadTournamentFileNull(){
|
||||||
io = new FileIO(mainDir);
|
|
||||||
assertThrows(IllegalArgumentException.class, () -> io.loadTournament(null));
|
assertThrows(IllegalArgumentException.class, () -> io.loadTournament(null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue