use of org.motechproject.tasks.domain.mds.task.FilterSet in project motech by motech.
the class TaskBuilderTest method shouldReturnBuiltTaskObject.
@Test
public void shouldReturnBuiltTaskObject() throws Exception {
TaskBuilder builder = new TaskBuilder();
Task task = builder.withName(TASK_NAME).withDescription(TASK_DESCRIPTION).isEnabled(isEnabled).withTrigger(new TaskTriggerInformation()).addAction(new TaskActionInformation()).withTaskConfig(new TaskConfig()).addFilterSet(new FilterSet()).addDataSource(new DataSource()).build();
assertNotNull(task);
assertEquals(TASK_NAME, task.getName());
assertEquals(TASK_DESCRIPTION, task.getDescription());
assertEquals(isEnabled, task.isEnabled());
assertNotNull(task.getTrigger());
assertNotNull(task.getActions());
assertFalse(task.getActions().isEmpty());
assertNotNull(task.getTaskConfig());
assertFalse(task.getTaskConfig().getDataSources().isEmpty());
assertFalse(task.getTaskConfig().getFilters().isEmpty());
}
Aggregations