From 384f7dd8746b673eb9754cdb1e3ce9f9358c37e5 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Sat, 28 Jul 2018 02:30:52 +0530 Subject: updatd test in RequestValidationExceptionTest.java to increase code coverage Issue-ID: APPC-1086 Change-Id: Id2a2f7f2476f4a6d2f917c713af374cd0d02f682 Signed-off-by: Sandeep J --- .../exceptions/RequestValidationExceptionTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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()); } -- cgit 1.2.3-korg