summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src
diff options
context:
space:
mode:
authoruj426b <uj426b@att.com>2020-05-13 18:41:47 -0400
committeruj426b <uj426b@att.com>2020-05-14 16:07:35 -0400
commit7a172d1c6922851e7008d1ce2afdf673193699d3 (patch)
tree35a0b1364daabc806d0e6f03e61a1831199a4c96 /ONAP-PAP-REST/src
parent39db5ecce3151ad42bc0c5433d14b2a81887a4ef (diff)
Fix Junit to clean up file/directory
Change-Id: Ib29b3b708bd28e333822d4c2b9db44e33f8e395f Issue-ID: POLICY-2496 Signed-off-by: uj426b <uj426b@att.com>
Diffstat (limited to 'ONAP-PAP-REST/src')
-rw-r--r--ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/service/ImportServiceTest.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/service/ImportServiceTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/service/ImportServiceTest.java
index b7d6bacbd..cee67dd51 100644
--- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/service/ImportServiceTest.java
+++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/service/ImportServiceTest.java
@@ -23,11 +23,14 @@ package org.onap.policy.pap.xacml.rest.service;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
-
import com.mockrunner.mock.web.MockHttpServletRequest;
import com.mockrunner.mock.web.MockHttpServletResponse;
+import java.io.File;
+import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.io.FileUtils;
+import org.junit.AfterClass;
import org.junit.Test;
public class ImportServiceTest {
@@ -74,4 +77,13 @@ public class ImportServiceTest {
HttpServletResponse response = new MockHttpServletResponse();
assertThatThrownBy(() -> service.doImportMicroServicePut(request, response)).isInstanceOf(Exception.class);
}
+
+ @AfterClass
+ public static void tearDown(){
+ try {
+ FileUtils.deleteDirectory(new File("ExtractDir"));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
}