use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class BuildingBlockValidatorRunnerTest method testValidate.
@Test
public void testValidate() {
BuildingBlockExecution execution = new DelegateExecutionImpl(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.MyPreValidatorTwo: my-error-two\norg.onap.so.bpmn.common.listener.validation.MyPreValidatorOne: my-error-one", workflowException.getErrorMessage());
}
runner.preValidate("test2", mock(BuildingBlockExecution.class));
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class AbstractVnfCDSRequestProviderTest method createBuildingBlockExecution.
protected BuildingBlockExecution createBuildingBlockExecution() {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable(GENERAL_BLOCK_EXECUTION_MAP_KEY, createGeneralBuildingBlock());
return new DelegateExecutionImpl(execution);
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class ConfigAssignVnfTest method createBuildingBlockExecution.
private BuildingBlockExecution createBuildingBlockExecution(Object serviceJson) {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable(GENERAL_BLOCK_EXECUTION_MAP_KEY, createGeneralBuildingBlock(serviceJson));
return new DelegateExecutionImpl(execution);
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class GenericCDSProcessingBBTest method createBuildingBlockExecution.
private BuildingBlockExecution createBuildingBlockExecution() {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable(GENERAL_BLOCK_EXECUTION_MAP_KEY, createGeneralBuildingBlock());
return new DelegateExecutionImpl(execution);
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class PrepareSdncUpgradePreCheckPnfBBTest method prepareBuildingBlockExecution.
private BuildingBlockExecution prepareBuildingBlockExecution(String payload) {
DelegateExecution execution = new DelegateExecutionFake();
execution.setVariable("payload", payload);
return new DelegateExecutionImpl(execution);
}
Aggregations