added test cases to ConfigComponentAdaptorTest 29/75929/3
authorSandeep J <sandeejh@in.ibm.com>
Thu, 17 Jan 2019 10:55:05 +0000 (16:25 +0530)
committerTakamune Cho <takamune.cho@att.com>
Thu, 17 Jan 2019 21:59:34 +0000 (21:59 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: I41734fcfc86da21114daacedaab02fbb2de86504
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/ConfigComponentAdaptorTest.java

index eae53a8..8e8c156 100644 (file)
@@ -6,7 +6,7 @@
  * ================================================================================
  * Copyright (C) 2017 Amdocs
  * =============================================================================
- * Modification Copyright (C) 2018 IBM.
+ * Modifications Copyright (C) 2018-2019 IBM.
  * =============================================================================
  * Modifications Copyright (C) 2018 Ericsson
  * =============================================================================
@@ -407,6 +407,18 @@ public class ConfigComponentAdaptorTest {
                 CoreMatchers.containsString("<configure>"));
     }
 
+    @Test
+    public void testActivateMethod() {
+        ConfigComponentAdaptor config= new ConfigComponentAdaptor(new Properties());
+        assertEquals(ConfigStatus.SUCCESS, config.activate("test", new SvcLogicContext()));
+    }
+    
+    @Test
+    public void testDeactivateMethod() {
+        ConfigComponentAdaptor config= new ConfigComponentAdaptor(new Properties());
+        assertEquals(ConfigStatus.SUCCESS, config.deactivate("test", new SvcLogicContext()));
+    }
+    
     @Test
     public void testStaticReadFileExceptionFlow() {
         assertEquals("", ConfigComponentAdaptor._readFile("NON_EXISTENT_FILE"));