From e99802fda660284a0d47872af2b0f797295341cf Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Fri, 15 Mar 2019 11:48:59 +0530 Subject: added test case to TestVmStatusChecker.java to increase code coverage Issue-ID: APPC-1086 Change-Id: Idf3acce4be6e950524d342466ee523b9b57b5b2c Signed-off-by: Sandeep J --- .../iaas/provider/operation/impl/TestVmStatuschecker.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 32168b309..c452d56df 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 @@ -6,7 +6,7 @@ * ================================================================================ * Copyright (C) 2017 Amdocs * ============================================================================= - * Copyright (C) 2019 IBM. + * Modifications Copyright (C) 2019 IBM. * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -102,4 +102,14 @@ public class TestVmStatuschecker { ModelObject mo = rbs.executeProviderOperation(mg.getParams(), mg.getSvcLogicContext()); verify(mg.getSvcLogicContext(), atLeastOnce()).setAttribute(Constants.STATUS_OF_VM, "ready"); } + + @Test + public void vmPausedStatuscheckerError() throws APPCException { + MockGenerator mg = new MockGenerator(Status.PAUSED); + 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, "paused"); + } } \ No newline at end of file -- cgit 1.2.3-korg