コード例 #1
0
  @Test
  public void canGetTaskByPath() {
    Task task = addTask("task");
    expectTaskLookupInOtherProject(":a:b:c", "task", task);

    assertThat(container.getByPath(":a:b:c:task"), sameInstance(task));
  }
コード例 #2
0
 @Test
 public void getByPathFailsForUnknownTask() {
   try {
     container.getByPath("unknown");
     fail();
   } catch (UnknownTaskException e) {
     assertThat(e.getMessage(), equalTo("Task with path 'unknown' not found in <project>."));
   }
 }
コード例 #3
0
  @Test
  public void canGetTaskByName() {
    Task task = addTask("task");

    assertThat(container.getByPath("task"), sameInstance(task));
  }