Skip to content

Commit

Permalink
Hopefully fix filepaths
Browse files Browse the repository at this point in the history
  • Loading branch information
avidraccoon committed Dec 2, 2024
1 parent eb0506c commit 8177335
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions parameter_tools/src/test/java/JSONSyncTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
public class JSONSyncTests {

public static final String DIRECTORY = new File("").getAbsolutePath();
public static final String BUILD_DIRECTORY = DIRECTORY + "\\build";
public static final String RESOURCE_DIRECTORY = BUILD_DIRECTORY + "\\resources\\test";
public static final String BUILD_DIRECTORY = DIRECTORY + "/build";
public static final String RESOURCE_DIRECTORY = BUILD_DIRECTORY + "/resources/test";

@BeforeEach
public void TestPrep() {
ExampleJsonSyncClass.synced =
new JSONSync<ExampleJsonSyncClass>(
new ExampleJsonSyncClass(),
RESOURCE_DIRECTORY + "\\ExampleJsonSyncClass.json",
RESOURCE_DIRECTORY + "/ExampleJsonSyncClass.json",
new JSONSync.JSONSyncConfigBuilder().setPrettyPrinting(true).build());
}

Expand All @@ -33,7 +33,7 @@ public void JsonSyncLoadDataTest() {

@Test
public void JsonSyncSetFileTest() {
ExampleJsonSyncClass.synced.setFile(RESOURCE_DIRECTORY + "\\SetFileTest.json");
ExampleJsonSyncClass.synced.setFile(RESOURCE_DIRECTORY + "/SetFileTest.json");
ExampleJsonSyncClass.synced.loadData();
ExampleJsonSyncClass instance = ExampleJsonSyncClass.synced.getObject();

Expand All @@ -50,7 +50,7 @@ public void JsonSyncSaveFileTest() {
ExampleJsonSyncClass.synced.loadData();
ExampleJsonSyncClass instance = ExampleJsonSyncClass.synced.getObject();
instance.testInt = 10;
ExampleJsonSyncClass.synced.setFile(RESOURCE_DIRECTORY + "\\SaveFileTest.json");
ExampleJsonSyncClass.synced.setFile(RESOURCE_DIRECTORY + "/SaveFileTest.json");
ExampleJsonSyncClass.synced.saveData();
}
}

0 comments on commit 8177335

Please sign in to comment.