Esempio n. 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));
  }
Esempio n. 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>."));
   }
 }
Esempio n. 3
0
  @Test
  public void canGetTaskByName() {
    Task task = addTask("task");

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