use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class AAICommonTasksTest method setup.
@Before
public void setup() {
serviceInstance = new ServiceInstance();
buildingBlockExecution = new DelegateExecutionImpl(new DelegateExecutionFake());
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class ExecuteActivityTest method before.
@Before
public void before() throws Exception {
execution = new DelegateExecutionFake();
execution.setVariable("vnfType", "testVnfType");
execution.setVariable("requestAction", "testRequestAction");
execution.setVariable("mso-request-id", "testMsoRequestId");
execution.setVariable("vnfId", "testVnfId");
execution.setVariable("serviceInstanceId", "testServiceInstanceId");
String bpmnRequest = new String(Files.readAllBytes(Paths.get("src/test/resources/__files/Macro/ServiceMacroAssign.json")));
execution.setVariable("bpmnRequest", bpmnRequest);
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class WorkflowValidatorRunnerTest method testValidate.
@Test
public void testValidate() {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable("testProcessKey", "1234");
try {
runner.preValidate("test", execution);
fail("exception not thrown");
} catch (BpmnError e) {
WorkflowException workflowException = (WorkflowException) execution.getVariable("WorkflowException");
assertEquals("Failed Validations:\norg.onap.so.bpmn.common.listener.validation.WorkflowPreValidatorTwo: my-error-two\norg.onap.so.bpmn.common.listener.validation.WorkflowPreValidatorOne: my-error-one", workflowException.getErrorMessage());
}
runner.preValidate("test2", mock(DelegateExecution.class));
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class DelegateExecutionImplTest method getGeneralBuildingBlockCastException.
@Test
public void getGeneralBuildingBlockCastException() {
final Map<String, Serializable> map = new HashMap<>();
map.put("gBBInput", new DelegateExecutionFake());
final DelegateExecutionImpl impl = create(map);
thrown.expect(MalformedBuildingBlockInputException.class);
impl.getGeneralBuildingBlock();
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class CreateRelationTest method setUp.
@Before
public void setUp() {
executionFake = new DelegateExecutionFake();
executionFake.setVariable("serviceInstanceId", SERVICE_INSTANCE_ID);
executionFake.setVariable("pnfCorrelationId", PNF_NAME);
}
Aggregations