added test cases to TestWorkFlowRequest.java 21/58221/3
authorSandeep J <sandeejh@in.ibm.com>
Tue, 31 Jul 2018 11:19:51 +0000 (16:49 +0530)
committerTakamune Cho <tc012c@att.com>
Tue, 31 Jul 2018 20:09:18 +0000 (20:09 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: Ic13af8abd0b984111cec2b8b4c822ea0f85c6286
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-dispatcher/appc-workflow-management/appc-workflow-management-api/src/test/java/org/onap/appc/workflow/objects/TestWorkflowRequest.java

index aa6fb6b..0c8cecf 100644 (file)
@@ -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