use of org.motechproject.tasks.domain.mds.channel.TaskEvent in project motech by motech.
the class AbstractTaskBundleIT method findActionEventBySubject.
protected ActionEvent findActionEventBySubject(List<ActionEvent> actionEvents, String subject) {
TaskEvent taskEvent = findTaskEventBySubject(actionEvents, subject);
assertTrue(taskEvent instanceof ActionEvent);
return (ActionEvent) taskEvent;
}
use of org.motechproject.tasks.domain.mds.channel.TaskEvent in project motech by motech.
the class AbstractTaskBundleIT method findTriggerEventBySubject.
protected TriggerEvent findTriggerEventBySubject(List<TriggerEvent> triggerEvents, String subject) {
TaskEvent taskEvent = findTaskEventBySubject(triggerEvents, subject);
assertTrue(taskEvent instanceof TriggerEvent);
return (TriggerEvent) taskEvent;
}
use of org.motechproject.tasks.domain.mds.channel.TaskEvent in project motech by motech.
the class TaskServiceImplTest method shouldFindActionForGivenInformation.
@Test
public void shouldFindActionForGivenInformation() throws ActionNotFoundException {
ActionEvent expected = new ActionEventBuilder().build();
expected.setSubject(action.getSubject());
expected.setDisplayName("receive");
Channel c = new Channel();
c.setActionTaskEvents(asList(expected));
when(channelService.getChannel("test-action")).thenReturn(c);
TaskEvent actual = taskService.getActionEventFor(action);
assertEquals(expected, actual);
}
Aggregations