09-25-2014 06:03 AM
<serviceTask id="serviceTask" activiti:class="com.yourcompany.delegate"/>
@Test
@Deployment
@MockServiceTask(originalClassName="com.yourcompany.delegate",
mockedClassName="org.activiti.standalone.testing.helpers.ServiceTaskTestMock")
public void testMockedServiceTaskAnnotation() {
Assert.assertEquals(0, ServiceTaskTestMock.CALL_COUNT.get());
activitiRule.getRuntimeService().startProcessInstanceByKey("mockSupportTest");
Assert.assertEquals(1, ServiceTaskTestMock.CALL_COUNT.get());
}
<serviceTask id="serviceTask" activiti:delegateExpression="${serviceTaskBean}"/>
@MockServiceTask(originalClassName="com.yourcompany.delegate",
mockedClassName="org.activiti.standalone.testing.helpers.SuccessfulServiceTaskTestMock")
public void testMockedServiceTaskSuccess() {
@MockServiceTask(originalClassName="com.yourcompany.delegate",
mockedClassName="org.activiti.standalone.testing.helpers.FailedServiceTaskTestMock")
public void testMockedServiceTaskFailure() {
08-07-2015 09:29 AM
08-14-2015 07:24 AM
08-14-2015 10:38 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.