Sonar:Access management wfenginemgr
[vfc/nfvo/wfengine.git] / wfenginemgrservice / src / test / java / org / onap / workflow / externalservice / service / activitiservice / ActivitiServiceConsumerTest.java
index af90c41..263cd30 100644 (file)
@@ -37,32 +37,32 @@ import org.onap.workflow.externalservice.entity.activitientitiy.ActivitiStartPro
 public class ActivitiServiceConsumerTest {\r
   @Test\r
   public void undeploybpmnfile() throws ClientProtocolException, IOException {\r
-    RestClient.isTest = true;\r
+    RestClient.setIsTest(true);\r
     RestResponse response = ActivitiServiceConsumer.undeploybpmnfile("22");\r
     Assert.assertTrue(response != null);\r
-    RestClient.isTest = false;\r
+    RestClient.setIsTest(false);\r
   }\r
 \r
   @Test\r
   public void startBpmnProcess() throws Exception {\r
-    RestClient.isTest = true;\r
+    RestClient.setIsTest(true);\r
     RestResponse response =\r
         ActivitiServiceConsumer.startBpmnProcess(mock(ActivitiStartProcessRequest.class));\r
     Assert.assertTrue(response != null);\r
-    RestClient.isTest = false;\r
+    RestClient.setIsTest(false);\r
   }\r
 \r
   @Test\r
   public void testDeleteDeployProcess() throws Exception {\r
-    RestClient.isTest = true;\r
+    RestClient.setIsTest(true);\r
     RestResponse response = ActivitiServiceConsumer.deleteDeployProcess("22");\r
     Assert.assertTrue(response != null);\r
-    RestClient.isTest = false;\r
+    RestClient.setIsTest(false);\r
   }\r
 \r
   @Test\r
   public void testDeleteDeployProcessReturnNull() throws Exception {\r
-    RestClient.isTest = false;\r
+    RestClient.setIsTest(false);\r
     RestResponse response = ActivitiServiceConsumer.deleteDeployProcess("22");\r
     if (response != null) {\r
       Assert.assertTrue(response.getResult() == null);\r
@@ -73,16 +73,16 @@ public class ActivitiServiceConsumerTest {
 \r
   @Test\r
   public void testStartProcessShouldReturnResponse() throws Exception {\r
-    RestClient.isTest = true;\r
+    RestClient.setIsTest(true);\r
     RestResponse response =\r
         ActivitiServiceConsumer.startProcess(mock(ActivitiStartProcessRequest.class));\r
     Assert.assertTrue(response != null);\r
-    RestClient.isTest = false;\r
+    RestClient.setIsTest(false);\r
   }\r
 \r
   @Test\r
   public void testStartProcessShouldReturnNull() {\r
-    RestClient.isTest = false;\r
+    RestClient.setIsTest(false);\r
     RestResponse response =\r
         ActivitiServiceConsumer.startProcess(mock(ActivitiStartProcessRequest.class));\r
     Assert.assertTrue(response.getResult() == null);\r
@@ -90,7 +90,7 @@ public class ActivitiServiceConsumerTest {
 \r
   @Test\r
   public void deploybpmnfile() throws Exception {\r
-    RestClient.isTest = true;\r
+    RestClient.setIsTest(true);\r
     WorkflowAppConfig workflowAppConfig = new WorkflowAppConfig();\r
     MsbClientConfig msbClientConfig = new MsbClientConfig();\r
     msbClientConfig.setMsbSvrPort(2);\r
@@ -102,7 +102,7 @@ public class ActivitiServiceConsumerTest {
     when(ins.read(Mockito.anyObject())).thenReturn(-21);\r
     ActivitiDeployResponse result = ActivitiServiceConsumer.deploybpmnfile(ins, "result");\r
     Assert.assertTrue(result == null);\r
-    RestClient.isTest = false;\r
+    RestClient.setIsTest(false);\r
   }\r
 \r
-}
\ No newline at end of file
+}\r