test created
This commit is contained in:
parent
df775ed93c
commit
7df4780fec
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.r0r5chach;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import com.r0r5chach.controllers.Controller;
|
||||||
|
|
||||||
|
public class ControllerTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void controllerSetCompetitorsTest() {
|
||||||
|
Controller c = new Controller();
|
||||||
|
CompetitorList cL = null;
|
||||||
|
try {
|
||||||
|
cL = new CompetitorList();
|
||||||
|
cL.readCompetitors(new File("src/test/resources/valorantPlayers.txt"));
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
c.setCompetitors(cL);
|
||||||
|
assertEquals(101, c.getCompetitors().getCompetitors().get(0).getPlayerNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void controllerGetCompetitorsTest() {
|
||||||
|
//Already tested in controllerSetCompetitorsTest()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
package com.r0r5chach;
|
package com.r0r5chach;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue