aboutsummaryrefslogtreecommitdiffstats
path: root/vnfapi/provider/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'vnfapi/provider/src/test/java')
-rw-r--r--vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTest.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTest.java b/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTest.java
index 7a0d5185..72c244d5 100644
--- a/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTest.java
+++ b/vnfapi/provider/src/test/java/org/onap/sdnc/vnfapi/VnfApiProviderTest.java
@@ -41,7 +41,6 @@ import org.opendaylight.yang.gen.v1.org.onap.sdnctl.vnf.rev150720.VnfInstanceTop
import org.opendaylight.yang.gen.v1.org.onap.sdnctl.vnf.rev150720.VnfInstanceTopologyOperationInputBuilder;
import org.opendaylight.yang.gen.v1.org.onap.sdnctl.vnf.rev150720.vnf.instance.request.information.VnfInstanceRequestInformation;
import org.opendaylight.yang.gen.v1.org.onap.sdnctl.vnf.rev150720.vnf.instance.request.information.VnfInstanceRequestInformationBuilder;
-
import java.util.concurrent.Future;
@@ -123,6 +122,22 @@ public class VnfApiProviderTest extends AbstractConcurrentDataBrokerTest {
checkVnfInstanceTopologyOperationOutput(result);
}
+ @Test
+ public void vnfInstanceTopologyOperationInput_VnfInstanceRequestInformationVnfInstanceIdIsZero() throws Exception {
+ VnfInstanceTopologyOperationInputBuilder builder = new VnfInstanceTopologyOperationInputBuilder();
+ builder.setVnfInstanceRequestInformation(new VnfInstanceRequestInformationBuilder()
+ .setVnfInstanceId("")
+ .build());
+
+ VnfInstanceTopologyOperationInput input = builder.build();
+ VnfInstanceTopologyOperationOutput result = vnfapiProvider
+ .vnfInstanceTopologyOperation(input)
+ .get()
+ .getResult();
+
+ checkVnfInstanceTopologyOperationOutput(result);
+ }
+
private void checkVnfInstanceTopologyOperationOutput(VnfInstanceTopologyOperationOutput result) {
String expectedResponseCode = "403";
String expectedResponseMessage = "invalid input, null or empty vnf-instance-id";
@@ -132,4 +147,4 @@ public class VnfApiProviderTest extends AbstractConcurrentDataBrokerTest {
Assert.assertEquals(result.getResponseMessage(), expectedResponseMessage);
Assert.assertEquals(result.getAckFinalIndicator(), expectedAckFinalIndicator);
}
- }
+ } \ No newline at end of file