From f734eff061de3c8570e005aa282ceed0b0a8f7b5 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Thu, 21 Mar 2019 19:26:25 +0530 Subject: added test case to VmStatuschecker.java to increase code coverage Issue-ID: APPC-1086 Change-Id: Id1a3be46235af057c1f3f72cd2afd8ebbe377bc2 Signed-off-by: Sandeep J --- .../iaas/provider/operation/impl/TestVmStatuschecker.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'appc-adapters/appc-iaas-adapter') diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/provider/operation/impl/TestVmStatuschecker.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/provider/operation/impl/TestVmStatuschecker.java index c452d56df..c59fe9fe1 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/provider/operation/impl/TestVmStatuschecker.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/onap/appc/adapter/iaas/provider/operation/impl/TestVmStatuschecker.java @@ -112,4 +112,14 @@ public class TestVmStatuschecker { ModelObject mo = rbs.executeProviderOperation(mg.getParams(), mg.getSvcLogicContext()); verify(mg.getSvcLogicContext(), atLeastOnce()).setAttribute(Constants.STATUS_OF_VM, "paused"); } + + @Test + public void vmPendingStatuscheckerError() throws APPCException { + MockGenerator mg = new MockGenerator(Status.PENDING); + Server server = mg.getServer(); + VmStatuschecker rbs = new VmStatuschecker(); + rbs.setProviderCache(mg.getProviderCacheMap()); + ModelObject mo = rbs.executeProviderOperation(mg.getParams(), mg.getSvcLogicContext()); + verify(mg.getSvcLogicContext(), atLeastOnce()).setAttribute(Constants.STATUS_OF_VM, "pending"); + } } \ No newline at end of file -- cgit 1.2.3-korg