New test case added for code coverage 68/93268/1
authorprakash.e <prakash.e@huawei.com>
Sun, 11 Aug 2019 05:16:44 +0000 (10:46 +0530)
committerprakash.e <prakash.e@huawei.com>
Sun, 11 Aug 2019 05:16:55 +0000 (10:46 +0530)
Added new test case with policyName and updateType in
PolicyUpdateNotifyOperation

Change-Id: Ib86dffc9d3e2c0633dcf151adf2b81c0adde3f6a
Issue-ID: SDNC-840
Signed-off-by: Prakash.E <prakash.e@huawei.com>
generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PolicyUpdateNotifyOperationRPCTest.java

index b73bd11..ff2a435 100644 (file)
@@ -33,4 +33,16 @@ public class PolicyUpdateNotifyOperationRPCTest extends GenericResourceApiProvid
         assertEquals("404", output.getErrorCode());
         assertEquals("Invalid input, missing input data", output.getErrorMsg());
     }
+
+    @Test
+    public void should_fail_when_valid_vnf_topology() throws Exception {
+
+        PolicyUpdateNotifyOperationInput input = build(PolicyUpdateNotifyOperationInput().setPolicyName("PolicyName").setUpdateType("UpdateType").setVersionId("vID"));
+
+        PolicyUpdateNotifyOperationOutput output =
+                exec(genericResourceApiProvider::policyUpdateNotifyOperation, input, RpcResult::getResult);
+
+        assertEquals("503", output.getErrorCode());
+        assertEquals("No service logic active for generic-resource-api: 'policy-update-notify-operation'", output.getErrorMsg());
+    }
 }