diff --git a/src/test/java/edu/ntnu/idi/idatt2003/g40/mappe/service/FileParserTest.java b/src/test/java/edu/ntnu/idi/idatt2003/g40/mappe/service/FileParserTest.java index e751602..7d87b1a 100644 --- a/src/test/java/edu/ntnu/idi/idatt2003/g40/mappe/service/FileParserTest.java +++ b/src/test/java/edu/ntnu/idi/idatt2003/g40/mappe/service/FileParserTest.java @@ -13,7 +13,9 @@ class FileParserTest { - private final String testStockDataPath = "src/main/resources/testStockData.txt"; + private final String testStockDataPath = "/testStockData.txt"; + + private final String absoluteTestStockDataPath = "src/main/resources/testStockData.txt"; FileParser fileParser; private final String validStockFromFile = "NVID, Nvidida Corporation, 241.591"; @@ -29,7 +31,7 @@ class FileParserTest { @BeforeEach void setUp() throws Exception { fileParser = new FileParser(testStockDataPath); - Path path = Paths.get(testStockDataPath); + Path path = Paths.get(absoluteTestStockDataPath); allLines = Files.readAllLines(path); try { validStocks = fileParser.readFile();