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 a77ba2c commit e475e03
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/test/java/edu/odu/cs/cs350/IntergrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

public class IntergrationTest {

private RecursiveSearch search;
private RecursiveSearch search1;
private RecursiveSearch search2;
private Output out1;
private Output out2;
private static String directory;
Expand All @@ -21,7 +22,8 @@ public class IntergrationTest {
public void setup() throws Exception {
out1 = new Output();
out2 = new Output();
search = new RecursiveSearch();
search1 = new RecursiveSearch();
search2 = new RecursiveSearch();
expectedFiles = new ArrayList<File>();

directory = "src/";
Expand All @@ -43,13 +45,13 @@ public void testSectionOneFunctionality() throws Exception {
" /home/runner/work/DupDetector/DupDetector/src/test/data/Point.h, 200\n" +
" /home/runner/work/DupDetector/DupDetector/src/test/data/test.cpp, 24\n" +
" /home/runner/work/DupDetector/DupDetector/src/test/data/readingList.h, 194\n";
out1.setFiles(search.searchDirectory(directory));

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

out2.setFiles(search.searchWithProperties(directory, properties));
out2.setFiles(search2.searchWithProperties(directory, properties));
assertTrue(out2.getFiles().containsAll(expectedFiles));
assertThat(out2.getSectionOne(), equalTo(expected));
}
Expand Down

0 comments on commit e475e03

Please sign in to comment.