Skip to content

Commit 5f1568c

Browse files
committed
Fixed Windows's path issues
1 parent bca4666 commit 5f1568c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/test/java/io/github/jeddict/ai/components/diff/DiffPaneControllerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void action_cannot_be_null_nor_invalid() throws Exception {
112112
thenThrownBy(() -> new DiffPaneController(P, F, C))
113113
.isInstanceOf(IllegalArgumentException.class)
114114
.hasMessageContaining("invalid project directory")
115-
.hasMessageContaining(P.getProjectDirectory().getPath());
115+
.hasMessageContaining(Paths.get(P.getProjectDirectory().getPath()).toString()); // keep Windows into account
116116
}
117117

118118
@Test
@@ -186,7 +186,7 @@ public void save_creates_a_new_file() throws Exception {
186186
P, "newfolder/newfile.txt", ""
187187
);
188188
ctrl.save("hello");
189-
expectedPath = Paths.get(P.realProjectDirectory).resolve("newfolder/newfile.txt");
189+
expectedPath = Paths.get(P.realProjectDirectory).resolve("newfolder").resolve("newfile.txt");
190190
then(expectedPath).exists().content().isEqualTo("hello");
191191

192192
//

0 commit comments

Comments
 (0)