From 818f71ca4c463f15f45fa98680a11dad3507ce46 Mon Sep 17 00:00:00 2001 From: Christian Martinez Date: Sun, 5 Dec 2021 23:14:23 -0500 Subject: [PATCH] fixed failed test --- .../edu/odu/cs/cs350/IntergrationTest.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/test/java/edu/odu/cs/cs350/IntergrationTest.java b/src/test/java/edu/odu/cs/cs350/IntergrationTest.java index fd01261..50e20a3 100644 --- a/src/test/java/edu/odu/cs/cs350/IntergrationTest.java +++ b/src/test/java/edu/odu/cs/cs350/IntergrationTest.java @@ -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 expectedFiles; @BeforeEach public void setup() throws Exception { - out = new Output(); + out1 = new Output(); + out2 = new Output(); search = new RecursiveSearch(); expectedFiles = new ArrayList(); @@ -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