summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-03-06 22:54:21 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-06 22:54:21 +0000
commit47cf51f5ec5e618d1ca9e1e9607a40ddef9283d8 (patch)
tree5d0359a83a49d260e732edfebac9d479d9ff95d4 /ONAP-PAP-REST
parentef7f703ce46a3bfec3051ff53f7a058cd859e07e (diff)
parent83fcb4f327512d857c7df91e35d9e1cb81dc4228 (diff)
Merge "JUnit workaround for PAP-REST, sonar bug"
Diffstat (limited to 'ONAP-PAP-REST')
-rw-r--r--ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/MicroServicePolicyTest.java3
-rw-r--r--ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/handler/DeleteHandlerTest.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/MicroServicePolicyTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/MicroServicePolicyTest.java
index fa4bd20f5..39b21f184 100644
--- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/MicroServicePolicyTest.java
+++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/components/MicroServicePolicyTest.java
@@ -40,7 +40,6 @@ import java.io.File;
import java.util.Collections;
@RunWith(PowerMockRunner.class)
-@PrepareForTest({MicroServiceConfigPolicy.class, CreateNewMicroServiceModel.class})
public class MicroServicePolicyTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
@@ -60,6 +59,7 @@ public class MicroServicePolicyTest {
assertNull(policy.getCorrectPolicyDataObject());
}
+ @PrepareForTest({MicroServiceConfigPolicy.class})
@Test
public void testPrepareToSave() throws Exception {
// Need to mock internal dictionary retrieval
@@ -84,6 +84,7 @@ public class MicroServicePolicyTest {
assertNotNull(model);
}
+ @PrepareForTest({CreateNewMicroServiceModel.class})
@Test
public void testCreateModel() throws Exception {
// Mock file retrieval
diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/handler/DeleteHandlerTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/handler/DeleteHandlerTest.java
index 9e9da17a5..3941593e9 100644
--- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/handler/DeleteHandlerTest.java
+++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/handler/DeleteHandlerTest.java
@@ -46,7 +46,6 @@ import java.util.List;
import javax.persistence.EntityManager;
@RunWith(PowerMockRunner.class)
-@PrepareForTest({DeleteHandler.class, XACMLPapServlet.class})
public class DeleteHandlerTest {
@Test
public void testGets() {
@@ -62,6 +61,7 @@ public class DeleteHandlerTest {
assertNotNull(handler);
}
+ @PrepareForTest({DeleteHandler.class, XACMLPapServlet.class})
@Test
public void testDeletes() throws Exception {
// Mock request