Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void setPlayerTest() throws FileNotFoundException {
- try {
- FileReader fr = new FileReader("entrants.txt");
- Scanner sc = new Scanner(fr);
- ArrayList<String> players = new ArrayList<String>();
- while (sc.hasNextLine()) {
- players.add(sc.nextLine());
- }
- sc.close();
- assertEquals("Player 1: Leon Hassan", players.get(0), "Leon Hassan");
- }
- catch (IOException e) {
- fail("Error - " + e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement