use of com.sequenceiq.flow.core.AbstractActionTestSupport in project cloudbreak by hortonworks.
the class DatahubRefreshActionsTest method testStartTriggersCall.
@Test
public void testStartTriggersCall() throws Exception {
DatahubRefreshStartEvent event = new DatahubRefreshStartEvent(SDX_ID, SDX_NAME, USER_CRN);
AbstractAction action = (AbstractAction) underTest.startDatahubRefreshAction();
initActionPrivateFields(action);
AbstractActionTestSupport testSupport = new AbstractActionTestSupport(action);
SdxContext context = SdxContext.from(new FlowParameters(FLOW_ID, USER_CRN, null), event);
testSupport.doExecute(context, event, new HashMap());
ArgumentCaptor<DatahubRefreshStartEvent> captor = ArgumentCaptor.forClass(DatahubRefreshStartEvent.class);
verify(reactorEventFactory, times(1)).createEvent(any(), captor.capture());
DatahubRefreshStartEvent captorValue = captor.getValue();
Assertions.assertEquals(SDX_NAME, captorValue.getSdxName());
}
Aggregations