// update
iterationMapper.addOrUpdate(iterationToUpdate);
// check
ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_ITERATION_FOR_UPDATE);
assertEquals("number of row", 1, databaseData.getRowCount());
assertEquals("id", new Integer(iterationToUpdate.getPersistanceId()), (Integer) databaseData.getValue(0, "id"));
assertEquals("rel_id", new Integer(3) , (Integer) databaseData.getValue(0, "rel_id"));
assertEquals("pro_id", new Integer(iterationToUpdate.getProject().getPersistanceId()), (Integer) databaseData.getValue(0, "pro_id"));
// TODO comment tester les dates ??
// assertEquals("start", iterationToUpdate.getStart(), (Date) databaseData.getValue(0, "start") );
// assertEquals("end", iterationToUpdate.getStart(), (Date) databaseData.getValue(0, "end") );
assertEquals("version", new Long(persistanceVersion), (Long) databaseData.getValue(0, "version"));
// check the stories
databaseData = getConnection().createQueryTable("ExpectedData", SELECT_STORY1);
assertEquals("id", new Integer(1), (Integer) databaseData.getValue(0, "id"));
assertEquals("ite_id", new Integer(iterationToUpdate.getPersistanceId()), (Integer) databaseData.getValue(0, "ite_id"));
databaseData = getConnection().createQueryTable("ExpectedData", SELECT_STORY2);
assertEquals("id", new Integer(2), (Integer) databaseData.getValue(0, "id"));
assertEquals("ite_id", new Integer(iterationToUpdate.getPersistanceId()), (Integer) databaseData.getValue(0, "ite_id"));
}