Skip to content

Commit

Permalink
Merge pull request #47 from wschaf/CBranch
Browse files Browse the repository at this point in the history
fixed failed test
  • Loading branch information
cmart075 authored Dec 6, 2021
2 parents e30185f + e475e03 commit 4918198
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/test/java/edu/odu/cs/cs350/IntergrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@

public class IntergrationTest {

private RecursiveSearch search;
private Output out;
private RecursiveSearch search1;
private RecursiveSearch search2;
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();
search = new RecursiveSearch();
out1 = new Output();
out2 = new Output();
search1 = new RecursiveSearch();
search2 = new RecursiveSearch();
expectedFiles = new ArrayList<File>();

directory = "src/";
Expand All @@ -42,15 +46,14 @@ 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(search1.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(search2.searchWithProperties(directory, properties));
assertTrue(out2.getFiles().containsAll(expectedFiles));
assertThat(out2.getSectionOne(), equalTo(expected));
}

@Test
Expand Down

0 comments on commit 4918198

Please sign in to comment.