Merge "Reorder modifiers"
[so.git] / bpmn / MSOCommonBPMN / src / test / java / org / openecomp / mso / client / appc / ApplicationControllerClientTest.java
index 7fe3288..59be823 100644 (file)
@@ -21,6 +21,7 @@
 package org.openecomp.mso.client.appc;\r
 \r
 import static org.junit.Assert.assertEquals;\r
+import static org.junit.Assert.assertNotNull;\r
 \r
 import java.util.Properties;\r
 import java.util.UUID;\r
@@ -28,7 +29,6 @@ import java.util.UUID;
 import org.junit.BeforeClass;\r
 import org.junit.Ignore;\r
 import org.junit.Test;\r
-\r
 import org.onap.appc.client.lcm.model.Action;\r
 import org.onap.appc.client.lcm.model.ActionIdentifiers;\r
 import org.onap.appc.client.lcm.model.CheckLockInput;\r
@@ -41,9 +41,16 @@ public class ApplicationControllerClientTest {
                System.setProperty("mso.config.path", "src/test/resources");\r
        }\r
 \r
+       @Test\r
+       public void testClientCreation() {\r
+               ApplicationControllerClient client = new ApplicationControllerClient("appc");\r
+               assertEquals(client.getControllerType(), "APPC");\r
+               assertNotNull(client.getAppCClient());\r
+       }\r
+\r
        @Test\r
        public void createRequest_CheckLock_RequestBuilt() {\r
-               ApplicationControllerClient client = new ApplicationControllerClient();\r
+               ApplicationControllerClient client = new ApplicationControllerClient("APPC");\r
                ActionIdentifiers actionIdentifiers = new ActionIdentifiers();\r
                actionIdentifiers.setVnfId("vnfId");\r
                CheckLockInput checkLockInput = (CheckLockInput) client.createRequest(Action.CheckLock, actionIdentifiers, null,\r
@@ -54,7 +61,7 @@ public class ApplicationControllerClientTest {
        @Test\r
        @Ignore // 1802 merge\r
        public void runCommand_liveAppc() {\r
-               ApplicationControllerClient client = new ApplicationControllerClient();\r
+               ApplicationControllerClient client = new ApplicationControllerClient("appc");\r
                ActionIdentifiers actionIdentifiers = new ActionIdentifiers();\r
                //actionIdentifiers.setVnfId("ca522254-2ba4-4fbd-b15b-0ef0d9cfda5f");\r
                actionIdentifiers.setVnfId("2d2bf10e-81a5-");\r
@@ -72,7 +79,7 @@ public class ApplicationControllerClientTest {
        @Test\r
        @Ignore // 1802 merge\r
        public void runCommand_CheckLock_RequestBuilt() {\r
-               ApplicationControllerClient client = new ApplicationControllerClient();\r
+               ApplicationControllerClient client = new ApplicationControllerClient("appc");\r
                ActionIdentifiers actionIdentifiers = new ActionIdentifiers();\r
                actionIdentifiers.setVnfId("fusion-vpp-vnf-001");\r
                Status status;\r
@@ -90,14 +97,17 @@ public class ApplicationControllerClientTest {
        public void test_getLCMPropertiesHelper() {\r
                ApplicationControllerClient client = new ApplicationControllerClient();\r
                Properties properties = client.getLCMProperties();\r
+               assertEquals(properties.get("topic.read"), "APPC-TEST-AMDOCS2");\r
                assertEquals(properties.get("topic.write"), "APPC-TEST-AMDOCS1-DEV3");\r
+               assertEquals(properties.get("SDNC-topic.read"), "SDNC-LCM-READ");\r
+               assertEquals(properties.get("SDNC-topic.write"), "SDNC-LCM-WRITE");\r
                assertEquals(properties.get("topic.read.timeout"), "120000");\r
                assertEquals(properties.get("client.response.timeout"), "120000");\r
-               assertEquals(properties.get("topic.read"), "APPC-TEST-AMDOCS2");\r
                assertEquals(properties.get("poolMembers"),\r
                                "uebsb93kcdc.it.att.com:3904,uebsb92kcdc.it.att.com:3904,uebsb91kcdc.it.att.com:3904");\r
                assertEquals(properties.get("client.key"), "iaEMAfjsVsZnraBP");\r
                assertEquals(properties.get("client.secret"), "wcivUjsjXzmGFBfxMmyJu9dz");\r
+               assertEquals(properties.get("controllerType"), "appc");\r
        }\r
 \r
 }
\ No newline at end of file