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