aboutsummaryrefslogtreecommitdiffstats
path: root/generic-resource-api/provider/src
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-08-12 13:12:25 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-12 13:12:25 +0000
commit8f6f18f0957932d4c03036f838daffb43c3d1dc4 (patch)
treec5cd4f86a0785a661cc48ca574288f152f55f83b /generic-resource-api/provider/src
parent8b69fffd6d7c514157f99c563681174e5acb8476 (diff)
parentb07d4397612bc882a6d46372ae550766a79116bd (diff)
Merge "New test case added for code coverage"
Diffstat (limited to 'generic-resource-api/provider/src')
-rw-r--r--generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GenericConfigurationTopologyOperationRPCTest.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GenericConfigurationTopologyOperationRPCTest.java b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GenericConfigurationTopologyOperationRPCTest.java
index 3962484a..629b485c 100644
--- a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GenericConfigurationTopologyOperationRPCTest.java
+++ b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/GenericConfigurationTopologyOperationRPCTest.java
@@ -13,6 +13,8 @@ import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.re
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.GenericConfigurationTopologyOperationOutput;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.request.information.RequestInformation;
import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.sdnc.request.header.SdncRequestHeader.SvcAction;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.service.information.ServiceInformationBuilder;
+import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.configuration.information.ConfigurationInformationBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
import static org.junit.Assert.assertEquals;
@@ -46,8 +48,19 @@ public class GenericConfigurationTopologyOperationRPCTest extends GenericResourc
assertEquals("Y", output.getAckFinalIndicator());
}
+ @Test
+ public void should_fail_when_valid_vnf_topology() throws Exception {
+ GenericConfigurationTopologyOperationInput input = build(GenericConfigurationTopologyOperationInput()
+ .setServiceInformation(new ServiceInformationBuilder().setServiceInstanceId("ServiceInsatnceId").build()));
-}
+ GenericConfigurationTopologyOperationOutput output =
+ exec(genericResourceApiProvider::genericConfigurationTopologyOperation, input, RpcResult::getResult);
+ assertEquals("404", output.getResponseCode());
+ assertEquals("invalid input, null or empty configuration-id or configuration-type", output.getResponseMessage());
+ assertEquals("Y", output.getAckFinalIndicator());
+ }
+
+}