From 8e635a0786241b28a788b58acfc67adcde8b2c7e Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Thu, 26 Jul 2018 17:25:23 +0530 Subject: 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 --- .../appc/executor/objects/TestLCMCommandStatus.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 map = new HashMap(); + 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 -- cgit 1.2.3-korg