Skip to content

Commit

Permalink
attempt to fix windows error
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudenw committed Jan 12, 2025
1 parent 26ffd48 commit 717508c
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.assertj.core.api.Assertions.assertThat;

public class FileListWalkerTest {

Expand Down Expand Up @@ -117,15 +116,13 @@ public static void setUp() throws Exception {

@Test
public void readFilesTest() throws RatException {
FileListWalker walker = new FileListWalker(new FileDocument(source, DocumentNameMatcher.MATCHES_ALL));
FileDocument fileDocument = new FileDocument(source, DocumentNameMatcher.MATCHES_ALL);
FileListWalker walker = new FileListWalker(fileDocument);
List<String> scanned = new ArrayList<>();
walker.run(new TestRatReport(scanned));
String[] expected = {regularName.localized("/"), hiddenName.localized("/"),
anotherName.localized("/")};
assertEquals(3, scanned.size());
for (String ex : expected) {
assertTrue(scanned.contains(ex), ()-> String.format("Missing %s from %s", ex, String.join(", ", scanned)));
}
assertThat(scanned).containsExactly(expected);
}

static class TestRatReport implements RatReport {
Expand Down

0 comments on commit 717508c

Please sign in to comment.