summaryrefslogtreecommitdiffstats
path: root/generic-resource-api/provider/src/test
diff options
context:
space:
mode:
authorprakash.e <prakash.e@huawei.com>2019-08-11 01:38:50 +0530
committerprakash.e <prakash.e@huawei.com>2019-08-11 01:39:04 +0530
commitb07d4397612bc882a6d46372ae550766a79116bd (patch)
tree2d77f9f73adf0cb6ca5db148f3fdbb65debcef71 /generic-resource-api/provider/src/test
parent1c38dbabc0dcc9787e9d8eb1bce8b206f8941ac2 (diff)
New test case added for code coverage
Test case added in GenericConfigurationTopologyOperation with service-istance-id Change-Id: I16c104de7156b10022b6589f49625ab95b2412bf Issue-ID: SDNC-840 Signed-off-by: Prakash.E <prakash.e@huawei.com>
Diffstat (limited to 'generic-resource-api/provider/src/test')
-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());
+ }
+
+}