Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.17 KB | None | 0 0
  1. package menu;
  2.  
  3. import controller.result.GenerateCompetitors;
  4. import controller.result.IO;
  5. import controller.result.ParseTimes;
  6. import java.io.IOException;
  7. import model.result.RaceResultList;
  8. import org.junit.Before;
  9. import org.junit.Test;
  10.  
  11. public class IOTest {
  12.   IO io;
  13.   ParseTimes starTime, finishTime;
  14.   GenerateCompetitors competitors;
  15.   RaceResultList rrl;
  16.  
  17.   @Before
  18.   public void setUp() throws Exception {
  19.     io = new IO();
  20.     io.parseNameFile("textfilesForTest/testNamnfil.txt")
  21.         .parseStartFile("textfilesForTest/testStarttider.txt")
  22.         .parseStartFile("textfilesForTest/testStarttider2.txt")
  23.         .parseFinishFile("textfilesForTest/testMaltider.txt")
  24.         .parseFinishFile("textfilesForTest/testMaltider2.txt");
  25.   }
  26.  
  27.   @Test
  28.   public void printResults() throws IOException {
  29.     io.printResults(
  30.         "StartNr; Namn; Totaltid; Starttid; Måltid", "textfilesForTest/testResultat.txt");
  31.   }
  32.  
  33.   @Test
  34.   public void testFormattedResult() throws IOException {
  35.     io.eventType("Novemberkåsan 2020");
  36.     io.printResults(
  37.         "StartNr; Namn; Totaltid; Starttid; Måltid", "textfilesForTest/testResultatFormatted.txt");
  38.   }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement