From 18c1a161549206205bca4e8a33b56618a598d607 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Tue, 31 Jul 2018 16:49:51 +0530 Subject: added test cases to TestWorkFlowRequest.java to increase code coverage Issue-ID: APPC-1086 Change-Id: Ic13af8abd0b984111cec2b8b4c822ea0f85c6286 Signed-off-by: Sandeep J --- .../appc/workflow/objects/TestWorkflowRequest.java | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'appc-dispatcher/appc-workflow-management') diff --git a/appc-dispatcher/appc-workflow-management/appc-workflow-management-api/src/test/java/org/onap/appc/workflow/objects/TestWorkflowRequest.java b/appc-dispatcher/appc-workflow-management/appc-workflow-management-api/src/test/java/org/onap/appc/workflow/objects/TestWorkflowRequest.java index aa6fb6b90..0c8cecf89 100644 --- a/appc-dispatcher/appc-workflow-management/appc-workflow-management-api/src/test/java/org/onap/appc/workflow/objects/TestWorkflowRequest.java +++ b/appc-dispatcher/appc-workflow-management/appc-workflow-management-api/src/test/java/org/onap/appc/workflow/objects/TestWorkflowRequest.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright 2018 TechMahindra *================================================================================= +* Modification 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 @@ -22,6 +24,9 @@ package org.onap.appc.workflow.objects; import static org.junit.Assert.*; import org.junit.Test; +import org.onap.appc.domainmodel.lcm.RequestContext; +import org.onap.appc.domainmodel.lcm.ResponseContext; +import org.onap.appc.domainmodel.lcm.VNFContext; public class TestWorkflowRequest { private WorkflowRequest workflowRequest=new WorkflowRequest(); @@ -35,4 +40,25 @@ public class TestWorkflowRequest { public void testToString_ContainsString() { assertTrue(workflowRequest.toString().contains("requestContext")); } + + @Test + public void testGetRequestContext() { + RequestContext requestContext= new RequestContext(); + workflowRequest.setRequestContext(requestContext); + assertEquals(requestContext, workflowRequest.getRequestContext()); + } + + @Test + public void testGetResponseContext() { + ResponseContext responseContext= new ResponseContext(); + workflowRequest.setResponseContext(responseContext); + assertEquals(responseContext, workflowRequest.getResponseContext()); + } + + @Test + public void testGetVnfContext() { + VNFContext vnfContext= new VNFContext(); + workflowRequest.setVnfContext(vnfContext); + assertEquals(vnfContext, workflowRequest.getVnfContext()); + } } \ No newline at end of file -- cgit 1.2.3-korg