aboutsummaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-dispatcher-common
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-07-26 19:03:38 +0530
committerTakamune Cho <tc012c@att.com>2018-07-27 13:10:45 +0000
commitc28e2c840bded5989cefb9b9d27f40f00766abb0 (patch)
treec2ff19d01bdc4f2c60dcef302af4561fd13dfd26 /appc-dispatcher/appc-dispatcher-common
parent14175c4605745183a09dcd0fdc72c0d4e8a05b20 (diff)
added test case to TestRequestContext.java
to increase code-coverage Issue-ID: APPC-1086 Change-Id: Iabee69884c983ff3391d682d185524a22ea08ab0 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-dispatcher/appc-dispatcher-common')
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestRequestContext.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestRequestContext.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestRequestContext.java
index 9aee8e10f..6e54ae187 100644
--- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestRequestContext.java
+++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/test/java/org/onap/appc/domainmodel/lcm/TestRequestContext.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
@@ -53,6 +55,15 @@ public class TestRequestContext {
Assert.assertTrue(requestContext.getAdditionalContext().containsKey("A"));
Assert.assertTrue(requestContext.getAdditionalContext().containsValue("a"));
}
+
+ @Test
+ public void testAddKeyValueToAdditionalContext() {
+ String key="key1";
+ String value="value1";
+ requestContext.addKeyValueToAdditionalContext(key, value);
+ Map<String, String> additionalContext= requestContext.getAdditionalContext();
+ Assert.assertEquals("value1", additionalContext.get("key1"));
+ }
@Test
public void testGetPayload() {