From 61091bdc1ea5736de68acabd84095ba6932d7b8b Mon Sep 17 00:00:00 2001 From: Ofir Sonsino Date: Mon, 9 Oct 2017 13:25:29 +0300 Subject: Improve SONAR coverage Change-Id: Icdae04aadd50e29a55db559a69495a688ea34b0e Issue-ID: VID-72 Signed-off-by: Ofir Sonsino --- .../java/org/openecomp/vid/policy/TestSuite.java | 2 +- .../vid/policy/rest/RequestDetailsTest.java | 33 ++++++++++++++++++++++ .../org/openecomp/vid/policy/rest/TestSuite.java | 11 ++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 vid-app-common/src/test/java/org/openecomp/vid/policy/rest/RequestDetailsTest.java create mode 100644 vid-app-common/src/test/java/org/openecomp/vid/policy/rest/TestSuite.java (limited to 'vid-app-common/src/test/java/org/openecomp/vid/policy') diff --git a/vid-app-common/src/test/java/org/openecomp/vid/policy/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/policy/TestSuite.java index b0ff4659..7d0b4eb2 100644 --- a/vid-app-common/src/test/java/org/openecomp/vid/policy/TestSuite.java +++ b/vid-app-common/src/test/java/org/openecomp/vid/policy/TestSuite.java @@ -7,6 +7,6 @@ import org.junit.runners.Suite; @Suite.SuiteClasses( { RestObjectTest.class, PolicyResponseWrapperTest.class, PolicyRestIntTest.class, PolicyUtilTest.class, - PolicyRestInterfaceTest.class }) + PolicyRestInterfaceTest.class, org.openecomp.vid.policy.rest.TestSuite.class }) public class TestSuite { // nothing } diff --git a/vid-app-common/src/test/java/org/openecomp/vid/policy/rest/RequestDetailsTest.java b/vid-app-common/src/test/java/org/openecomp/vid/policy/rest/RequestDetailsTest.java new file mode 100644 index 00000000..70577557 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/policy/rest/RequestDetailsTest.java @@ -0,0 +1,33 @@ +package org.openecomp.vid.policy.rest; + +import org.junit.Test; + + +public class RequestDetailsTest { + + private RequestDetails createTestSubject() { + return new RequestDetails(); + } + + + @Test + public void testGetPolicyName() throws Exception { + RequestDetails testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getPolicyName(); + } + + + @Test + public void testSetPolicyName() throws Exception { + RequestDetails testSubject; + String policyName = ""; + + // default test + testSubject = createTestSubject(); + testSubject.setPolicyName(policyName); + } +} \ No newline at end of file diff --git a/vid-app-common/src/test/java/org/openecomp/vid/policy/rest/TestSuite.java b/vid-app-common/src/test/java/org/openecomp/vid/policy/rest/TestSuite.java new file mode 100644 index 00000000..9b491c86 --- /dev/null +++ b/vid-app-common/src/test/java/org/openecomp/vid/policy/rest/TestSuite.java @@ -0,0 +1,11 @@ +package org.openecomp.vid.policy.rest; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses( + +{ RequestDetailsTest.class }) +public class TestSuite { // nothing +} -- cgit 1.2.3-korg