From a915cce776fc4094c0cb20840a783389d9951067 Mon Sep 17 00:00:00 2001 From: ajay priyadarshi Date: Wed, 28 Mar 2018 12:45:09 +0530 Subject: Sonar:Access management wfenginemgr common/RestClient.java file name:RestClient.java Change-Id: Idabb6ed057ab678178e11092eaf3d307c4f51dc7 Issue-ID: VFC-857 Signed-off-by: ajay priyadarshi --- .../onap/workflow/resources/WorkflowInstanceWrapperTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'wfenginemgrservice/src/test/java/org/onap/workflow/resources') diff --git a/wfenginemgrservice/src/test/java/org/onap/workflow/resources/WorkflowInstanceWrapperTest.java b/wfenginemgrservice/src/test/java/org/onap/workflow/resources/WorkflowInstanceWrapperTest.java index 487051f..b2253d6 100644 --- a/wfenginemgrservice/src/test/java/org/onap/workflow/resources/WorkflowInstanceWrapperTest.java +++ b/wfenginemgrservice/src/test/java/org/onap/workflow/resources/WorkflowInstanceWrapperTest.java @@ -44,36 +44,36 @@ public class WorkflowInstanceWrapperTest { @Test public final void testDeployBpmnFile() throws Exception { - RestClient.isTest = true; + RestClient.setIsTest(true); InputStream fileInputStream = mock(InputStream.class); FormDataContentDisposition f = mock(FormDataContentDisposition.class); String filename = "test"; when(fileInputStream.read(Mockito.anyObject())).thenReturn(-21); Response reponse = workflowInstanceWrapper.deployBpmnFile(filename, fileInputStream, f); Assert.assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), reponse.getStatus()); - RestClient.isTest = false; + RestClient.setIsTest(false); } @Test public final void testUndeployBpmnFile() throws Exception { - RestClient.isTest = true; + RestClient.setIsTest(true); RestResponse response = WorkflowInstanceWrapper.getInstance().undeployBpmnFile(null); if (response != null) { Assert.assertTrue(response.getResult() == null); } - RestClient.isTest = false; + RestClient.setIsTest(false); } @Test public final void testStartProcess() throws Exception { - RestClient.isTest = true; + RestClient.setIsTest(true); ActivitiStartProcessRequest startProcessRequest = new ActivitiStartProcessRequest(); startProcessRequest.setProcessDefinitionKey("first"); StartProcessRequest tt = new StartProcessRequest(); tt.setProcessDefinitionKey("first"); Response reponse = workflowInstanceWrapper.startProcess(tt); Assert.assertEquals(Response.Status.OK.getStatusCode(), reponse.getStatus()); - RestClient.isTest = false; + RestClient.setIsTest(false); } } -- cgit 1.2.3-korg