@Test(expected = RepositoryException.class) public void testGetConditionsByTaskIdNoDataSource() throws RepositoryException { DataSourceWorkflowRepository repo = new DataSourceWorkflowRepository(null); List<WorkflowCondition> workflow = repo.getConditionsByTaskName("1"); assertThat(workflow, allOf(notNullValue(), hasSize(1))); assertThat(workflow.get(0).getConditionName(), equalTo("Test Condition")); }
@Test public void testGetConditionsByTaskName() throws RepositoryException { DataSourceWorkflowRepository repo = new DataSourceWorkflowRepository(ds); List<WorkflowCondition> workflow = repo.getConditionsByTaskName("Test Task"); assertThat(workflow, allOf(notNullValue(), hasSize(1))); assertThat(workflow.get(0).getConditionName(), equalTo("TrueCond")); }