aboutsummaryrefslogtreecommitdiffstats
path: root/generic-resource-api/provider/src
diff options
context:
space:
mode:
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());
+ }
+
+}