diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-07-26 23:57:04 +0530 |
---|---|---|
committer | Takamune Cho <tc012c@att.com> | 2018-07-29 21:24:56 +0000 |
commit | 61c1c825b6d2bdfa1e66bef9559dba1b529e15a2 (patch) | |
tree | 0ff150a64da7cbb8a0c65d7aaff8f621551ad3bc /appc-dispatcher | |
parent | aa6cd2f6479141ff2a1534b1672825c0d6517b92 (diff) |
added test cases to TestResponseContext.java
to increase code coverage
Issue-ID: APPC-1086
Change-Id: Ia82129b891a518e6dfa1809ab94f308775d29a9c
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-dispatcher')
-rw-r--r-- | appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestResponseContext.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestResponseContext.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestResponseContext.java index 18eaf8a86..ffa80b490 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestResponseContext.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestResponseContext.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright 2018 TechMahindra *================================================================================= +* Modifications Copyright 2018 IBM. +*================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -65,5 +67,20 @@ public class TestResponseContext { public void testToString_ContainsString() { assertTrue(responseContext.toString().contains("ResponseContext{commonHeader")); } + + @Test + public void testAddKeyValueToAdditionalContext() { + String key="key1"; + String value="value1"; + responseContext.addKeyValueToAdditionalContext(key, value); + Map<String, String> additionalContext= responseContext.getAdditionalContext(); + Assert.assertEquals("value1", additionalContext.get("key1")); + } + + @Test + public void testGetPayloadObject() { + responseContext.setPayloadObject("ABC:2000"); + Assert.assertEquals("ABC:2000", responseContext.getPayloadObject()); + } } |