summaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-command-executor/appc-command-executor-api
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-07-26 17:25:23 +0530
committerPatrick Brady <pb071s@att.com>2018-07-27 22:14:47 +0000
commit8e635a0786241b28a788b58acfc67adcde8b2c7e (patch)
tree48622cd758e0ec5a7e154d238727d9c1b6935a65 /appc-dispatcher/appc-command-executor/appc-command-executor-api
parent2c0de92cf9ade399f6afc05af3ae7211e2eeb425 (diff)
added test case to TestLCMCommandStatus.java
addes test case to increase code-coverage Issue-ID: APPC-1086 Change-Id: Ie36b332e947900990d62a11723070a5ae8e53a99 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-dispatcher/appc-command-executor/appc-command-executor-api')
-rw-r--r--appc-dispatcher/appc-command-executor/appc-command-executor-api/src/test/java/org/onap/appc/executor/objects/TestLCMCommandStatus.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-api/src/test/java/org/onap/appc/executor/objects/TestLCMCommandStatus.java b/appc-dispatcher/appc-command-executor/appc-command-executor-api/src/test/java/org/onap/appc/executor/objects/TestLCMCommandStatus.java
index 04c8a69d4..f778357e4 100644
--- a/appc-dispatcher/appc-command-executor/appc-command-executor-api/src/test/java/org/onap/appc/executor/objects/TestLCMCommandStatus.java
+++ b/appc-dispatcher/appc-command-executor/appc-command-executor-api/src/test/java/org/onap/appc/executor/objects/TestLCMCommandStatus.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
@@ -21,6 +23,9 @@ package org.onap.appc.executor.objects;
import static org.junit.Assert.*;
+import java.util.HashMap;
+import java.util.Map;
+
import org.junit.Test;
public class TestLCMCommandStatus {
@@ -59,4 +64,17 @@ public class TestLCMCommandStatus {
public void testTostring() {
assertTrue(accepted.toString().contains(accepted.name()));
}
+
+ @Test
+ public void testGetFormattedMessageWithCode() {
+ Params params= new Params();
+ Map<String, java.lang.Object> map = new HashMap<String, java.lang.Object>();
+ map.put("testKey1", "testValue1");
+ map.put("testKey2", "testValue2");
+ params.setParams(map);
+ String response=accepted.getFormattedMessageWithCode(params);
+ String expected="100-ACCEPTED - request accepted";
+ assertEquals(expected, response);
+ }
+
} \ No newline at end of file