Skip to content

Commit

Permalink
fixed failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmart075 committed Dec 6, 2021
1 parent e30185f commit 818f71c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/test/java/edu/odu/cs/cs350/IntergrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
public class IntergrationTest {

private RecursiveSearch search;
private Output out;
private Output out1;
private Output out2;
private static String directory;
private static String properties;
private static List<File> expectedFiles;

@BeforeEach
public void setup() throws Exception {
out = new Output();
out1 = new Output();
out2 = new Output();
search = new RecursiveSearch();
expectedFiles = new ArrayList<File>();

Expand All @@ -42,15 +44,15 @@ public void testSectionOneFunctionality() throws Exception {
" /home/runner/work/DupDetector/DupDetector/src/test/data/test.cpp, 24\n" +
" /home/runner/work/DupDetector/DupDetector/src/test/data/readingList.h, 194\n";

out.setFiles(search.searchDirectory(directory));
assertTrue(out.getFiles().containsAll(expectedFiles));
assertThat(out.getFiles().size(), is(5));
assertThat(out.getSectionOne(), equalTo(expected));
out1.setFiles(search.searchDirectory(directory));
assertTrue(out1.getFiles().containsAll(expectedFiles));
assertThat(out1.getFiles().size(), is(5));
assertThat(out1.getSectionOne(), equalTo(expected));

out.setFiles(search.searchWithProperties(directory, properties));
assertTrue(out.getFiles().containsAll(expectedFiles));
assertThat(out.getFiles().size(), is(5));
assertThat(out.getSectionOne(), equalTo(expected));
out2.setFiles(search.searchWithProperties(directory, properties));
assertTrue(out2.getFiles().containsAll(expectedFiles));
assertThat(out2.getFiles().size(), is(5));
assertThat(out2.getSectionOne(), equalTo(expected));
}

@Test
Expand Down

0 comments on commit 818f71c

Please sign in to comment.