コード例 #1
0
  @Test(expected = RepositoryException.class)
  public void testGetTaskByIdNoDataSource() throws RepositoryException {
    DataSourceWorkflowRepository repo = new DataSourceWorkflowRepository(null);
    WorkflowTask task = repo.getTaskById("1");

    assertThat(task, notNullValue());
    assertThat(task.getTaskName(), allOf(notNullValue(), equalTo("Test")));
  }
コード例 #2
0
  @Test
  public void testGetTaskById() throws RepositoryException {
    DataSourceWorkflowRepository repo = new DataSourceWorkflowRepository(ds);
    WorkflowTask task = repo.getTaskById("1");

    assertThat(task, notNullValue());
    assertThat(task.getTaskName(), allOf(notNullValue(), equalTo("Test Task")));
  }