From 7070eeaa0b5a77ec1f9330cea85ae78940334cde Mon Sep 17 00:00:00 2001 From: = Date: Thu, 14 May 2026 15:22:54 +0200 Subject: [PATCH] Update FileParserTest.java --- .../idi/idatt2003/g40/mappe/service/FileParserTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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();