summaryrefslogtreecommitdiffstats
path: root/appc-dispatcher
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-07-28 02:30:52 +0530
committerTakamune Cho <tc012c@att.com>2018-07-29 21:23:16 +0000
commit384f7dd8746b673eb9754cdb1e3ce9f9358c37e5 (patch)
treea105163a561e00103c20fb4246496fd0bf8c763d /appc-dispatcher
parent41e91dd1fac9873d8ac37b00156eaec8d383f3e0 (diff)
updatd test in RequestValidationExceptionTest.java
to increase code coverage Issue-ID: APPC-1086 Change-Id: Id2a2f7f2476f4a6d2f917c713af374cd0d02f682 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-dispatcher')
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-core/src/test/java/org/onap/appc/requesthandler/exceptions/RequestValidationExceptionTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/test/java/org/onap/appc/requesthandler/exceptions/RequestValidationExceptionTest.java b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/test/java/org/onap/appc/requesthandler/exceptions/RequestValidationExceptionTest.java
index 2099d9d25..caeab723c 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/test/java/org/onap/appc/requesthandler/exceptions/RequestValidationExceptionTest.java
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/test/java/org/onap/appc/requesthandler/exceptions/RequestValidationExceptionTest.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
* =============================================================================
+ * Modifications Copyright (C) 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
@@ -25,13 +27,22 @@ import org.junit.Test;
import org.onap.appc.executor.objects.LCMCommandStatus;
import org.onap.appc.executor.objects.Params;
+import junit.framework.Assert;
+
public class RequestValidationExceptionTest {
+ @SuppressWarnings("deprecation")
@Test
public final void testRequestValidationExceptionWithParams() {
String message = "tesingMessage";
String command = "tesingCommand";
Params p = new Params().addParam("actionName", command);
RequestValidationException rve = new RequestValidationException(message, LCMCommandStatus.MISSING_MANDATORY_PARAMETER, p);
+ rve.setLogMessage("testLogMessage");
+ Assert.assertEquals("testLogMessage", rve.getLogMessage());
+ rve.setTargetEntity("testTargetEntity");
+ Assert.assertEquals("testTargetEntity", rve.getTargetEntity());
+ rve.setTargetService("testTargetService");
+ Assert.assertEquals("testTargetService", rve.getTargetService());
assertNotNull(rve.getParams());
assertNotNull(rve.getMessage());
}