use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class SDNCRequestTasksTest method setup.
@Before
public void setup() {
delegateExecution = new DelegateExecutionFake();
delegateExecution.setVariable("SDNCRequest", createSDNCRequest());
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class ManualHandlingTasksTest method before.
@Before
public void before() throws Exception {
MockitoAnnotations.initMocks(this);
delegateExecution = new DelegateExecutionFake();
buildingBlockExecution = new DelegateExecutionImpl(delegateExecution);
generalBuildingBlock = new GeneralBuildingBlock();
requestContext = new RequestContext();
requestContext.setRequestorId("someRequestorId");
generalBuildingBlock.setRequestContext(requestContext);
buildingBlockExecution.setVariable("mso-request-id", ("testMsoRequestId"));
buildingBlockExecution.setVariable("vnfType", "testVnfType");
buildingBlockExecution.setVariable("gBBInput", generalBuildingBlock);
buildingBlockExecution.setVariable("rainyDayVnfName", "someVnfName");
buildingBlockExecution.setVariable("workStep", "someWorkstep");
buildingBlockExecution.setVariable("taskTimeout", "PT5M");
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class ExecuteBuildingBlockRainyDayUnitTest method setup.
@Before
public void setup() {
exception = new WorkflowException("Test exception", 7000, "", "", ONAPComponents.SDNC);
noExtSystemErrorSourceException = new WorkflowException("Test exception without extsystemErrorSource", 7000, "", "");
execution = new DelegateExecutionFake();
execution.setVariable("mso-request-id", "ef7c004b-829f-4773-a7d8-4de29feef5b1");
executionNullisRollback = new DelegateExecutionFake();
executionNullisRollback.setVariable("mso-request-id", "ef7c004b-829f-4773-a7d8-4de29feef5b1");
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class GeneratePnfUuidDelegateTest method execute_shouldSetValidUuidAsPnfUuid.
@Test
public void execute_shouldSetValidUuidAsPnfUuid() {
// given
GeneratePnfUuidDelegate delegate = new GeneratePnfUuidDelegate();
DelegateExecution execution = new DelegateExecutionFake();
// when
delegate.execute(execution);
// then
assertThat((String) execution.getVariable(PNF_UUID)).matches(PnfCheckInputs.UUID_REGEX);
}
use of org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake in project so by onap.
the class WorkflowActionBBFailureTest method before.
@Before
public void before() throws Exception {
execution = new DelegateExecutionFake();
org.onap.aai.domain.yang.ServiceInstance servInstance = new org.onap.aai.domain.yang.ServiceInstance();
servInstance.setServiceInstanceId("TEST");
when(bbSetupUtils.getAAIServiceInstanceByName(anyString(), isA(Customer.class))).thenReturn(servInstance);
workflowAction.setBbInputSetupUtils(bbSetupUtils);
workflowAction.setBbInputSetup(bbInputSetup);
}
Aggregations