\r
@Test\r
public final void testDeployBpmnFile() throws Exception {\r
- RestClient.isTest = true;\r
+ RestClient.setIsTest(true);\r
InputStream fileInputStream = mock(InputStream.class);\r
FormDataContentDisposition f = mock(FormDataContentDisposition.class);\r
String filename = "test";\r
when(fileInputStream.read(Mockito.anyObject())).thenReturn(-21);\r
Response reponse = workflowInstanceWrapper.deployBpmnFile(filename, fileInputStream, f);\r
Assert.assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), reponse.getStatus());\r
- RestClient.isTest = false;\r
+ RestClient.setIsTest(false);\r
}\r
\r
@Test\r
public final void testUndeployBpmnFile() throws Exception {\r
- RestClient.isTest = true;\r
+ RestClient.setIsTest(true);\r
RestResponse response = WorkflowInstanceWrapper.getInstance().undeployBpmnFile(null);\r
if (response != null) {\r
Assert.assertTrue(response.getResult() == null);\r
}\r
- RestClient.isTest = false;\r
+ RestClient.setIsTest(false);\r
}\r
\r
@Test\r
public final void testStartProcess() throws Exception {\r
- RestClient.isTest = true;\r
+ RestClient.setIsTest(true);\r
ActivitiStartProcessRequest startProcessRequest = new ActivitiStartProcessRequest();\r
startProcessRequest.setProcessDefinitionKey("first");\r
StartProcessRequest tt = new StartProcessRequest();\r
tt.setProcessDefinitionKey("first");\r
Response reponse = workflowInstanceWrapper.startProcess(tt);\r
Assert.assertEquals(Response.Status.OK.getStatusCode(), reponse.getStatus());\r
- RestClient.isTest = false;\r
+ RestClient.setIsTest(false);\r
}\r
\r
}\r