diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2019-02-13 15:32:31 +0530 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2019-02-14 14:20:14 +0000 |
commit | a2e8379525676bf48ef13e3ed953c836aa37dd07 (patch) | |
tree | 8f8c7f1b28ab4ff5ed56f8f01d14520f553f8746 /appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src | |
parent | 80eb0a82d39ff0c462118eca26853fe81f99fdac (diff) |
added test case to TestAnsibleMessageParser.java
to increase code coverage
Issue-ID: APPC-1086
Change-Id: Ic0546d8cff108551d32bb7db71238e1c968d0bef
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src')
-rw-r--r-- | appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/test/java/org/onap/appc/adapter/ansible/model/TestAnsibleMessageParser.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/test/java/org/onap/appc/adapter/ansible/model/TestAnsibleMessageParser.java b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/test/java/org/onap/appc/adapter/ansible/model/TestAnsibleMessageParser.java index 9a4690e16..6d2e7bbf1 100644 --- a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/test/java/org/onap/appc/adapter/ansible/model/TestAnsibleMessageParser.java +++ b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/test/java/org/onap/appc/adapter/ansible/model/TestAnsibleMessageParser.java @@ -183,4 +183,17 @@ public class TestAnsibleMessageParser { assertEquals("TestUser",result.get("User")); assertEquals("TestPassword",result.get("Password")); } + + @Test + public void testReqUriResultWithIPs() throws Exception { + Map<String, String> params = new HashMap<>(); + params.put("AgentUrl", "http://xx:yy:zz"); + params.put("Id", "TestId"); + params.put("User", "TestUser"); + params.put("Password", "TestPassword"); + String serverIp="10.0.2.3"; + String actual=msgParser.reqUriResultWithIP(params, serverIp); + String expected= "http://10.0.2.3:yy:zz?Id=TestId&Type=GetResult"; + assertEquals(expected, actual); + } } |