Dependency.create(taskBeingTransformed, destinationDependencyTask,
Type.END_START);
}
public void detachRemovesDependenciesFromRelatedTasks() {
Task taskToDetach = (Task) TaskTest.createValidTask();
Task sourceDependencyTask = (Task) TaskTest.createValidTask();
Task destinationDependencyTask = (Task) TaskTest.createValidTask();
taskToDetach.setName("prueba");
taskToDetach.setNotes("blabla");
taskToDetach.setStartDate(new Date());
addDependenciesForChecking(taskToDetach, sourceDependencyTask,
destinationDependencyTask);
taskToDetach.detach();
assertThat(sourceDependencyTask.getDependenciesWithThisOrigin().size(),
equalTo(0));
assertThat(destinationDependencyTask
.getDependenciesWithThisDestination().size(), equalTo(0));
}