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

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