assertSame(task, context.getTargetObject());
}
public void testPopulateStory() throws Exception {
Project project = newProject();
Iteration iteration = newIteration(project);
UserStory story = newUserStory(iteration);
commitCloseAndOpenSession();
DomainContext context = new DomainContext();
context.populate(story);
assertEquals(project.getId(), context.getProjectId());
assertEquals(project.getName(), context.getProjectName());
assertEquals(iteration.getId(), context.getIterationId());
assertEquals(iteration.getName(), context.getIterationName());
assertEquals(story.getId(), context.getStoryId());
assertEquals(story.getName(), context.getStoryName());
assertSame(story, context.getTargetObject());
}