Skip to content

Commit f33785b

Browse files
Fixes test failure on Windows.
1 parent 2986e7c commit f33785b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/test/java/com/structurizr/cli/AbstractCommandTests.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22

33
import org.junit.jupiter.api.Test;
44

5+
import java.io.File;
6+
57
import static org.junit.jupiter.api.Assertions.*;
68

79
public class AbstractCommandTests {
810

911
@Test
1012
public void loadWorkspace_ThrowsAnException_WhenTheWorkspacePathIsADirectory() {
13+
File file = new File("src/test/dsl");
1114
try {
12-
new ValidateCommand().loadWorkspace("src/test/dsl");
15+
16+
new ValidateCommand().loadWorkspace(file.getAbsolutePath());
1317
fail();
1418
} catch (Exception e) {
15-
assertTrue(e.getMessage().endsWith("/src/test/dsl is not a JSON or DSL file"));
19+
assertTrue(e.getMessage().endsWith(file.getAbsolutePath() + " is not a JSON or DSL file"));
1620
}
1721
}
1822

0 commit comments

Comments
 (0)