Skip to content

Commit

Permalink
Fixes test failure on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrowndotje committed Nov 2, 2024
1 parent 2986e7c commit f33785b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/test/java/com/structurizr/cli/AbstractCommandTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@

import org.junit.jupiter.api.Test;

import java.io.File;

import static org.junit.jupiter.api.Assertions.*;

public class AbstractCommandTests {

@Test
public void loadWorkspace_ThrowsAnException_WhenTheWorkspacePathIsADirectory() {
File file = new File("src/test/dsl");
try {
new ValidateCommand().loadWorkspace("src/test/dsl");

new ValidateCommand().loadWorkspace(file.getAbsolutePath());
fail();
} catch (Exception e) {
assertTrue(e.getMessage().endsWith("/src/test/dsl is not a JSON or DSL file"));
assertTrue(e.getMessage().endsWith(file.getAbsolutePath() + " is not a JSON or DSL file"));
}
}

Expand Down

0 comments on commit f33785b

Please sign in to comment.