new Integer(6666),
new Integer(7777)
};
support.setUpSubjectInRole("editor");
UserStory continuedStory = action.continueStory(support.request, support.hibernateSession, story, 33);
support.assertHistoricalEvent(1111, HistoricalEvent.CREATED, "continuation", XPlannerTestSupport.DEFAULT_PERSON_ID);
support.assertHistoricalEvent(3333, HistoricalEvent.CREATED, "continuation", XPlannerTestSupport.DEFAULT_PERSON_ID);
support.assertHistoricalEvent(5555, HistoricalEvent.CREATED, "continuation", XPlannerTestSupport.DEFAULT_PERSON_ID);
assertEquals("wrong iteration ID", 33, continuedStory.getIterationId());
assertEquals("wrong name", story.getName(), continuedStory.getName());
assertEquals("wrong customer", story.getCustomer(), continuedStory.getCustomer());
assertEquals("wrong priority", story.getPriority(), continuedStory.getPriority());
assertTrue("wrong story desc.",
story.getDescription().indexOf("Continued as story:" + continuedStory.getId()) != -1);
assertTrue("wrong continuedStory desc.",
continuedStory.getDescription().indexOf("Continued from story:" + story.getId()) != -1);
assertEquals("wrong # of tasks", 2, support.hibernateSession.saveObjects.size() - 1);
Iterator taskItr = support.hibernateSession.saveObjects.iterator();
taskItr.next(); // skip story
assertTaskProperties(task1, (Task)taskItr.next(), continuedStory);
assertTaskProperties(task2, (Task)taskItr.next(), continuedStory);