// add
releaseMapper.addOrUpdate(release);
// check
ITable databaseData = getConnection().createQueryTable("ExpectedData", SELECT_FOR_ADD);
assertEquals("number of row", 1, databaseData.getRowCount());
assertEquals("pro_id", new Integer(2), (Integer) databaseData.getValue(0, "pro_id"));
assertEquals("number", "2B", databaseData.getValue(0, "number"));
// TODO Comment tester les dates ???
//assertEquals("date", date, (Date)databaseData.getValue(0, "date") );
assertEquals("version", new Long(0), (Long) databaseData.getValue(0, "version"));
// récupération des id pour tester que les stories ont bien cette nouvelle release
Integer releasePersistanceId = (Integer) databaseData.getValue(0, "id");
// check the stories
databaseData = getConnection().createQueryTable("ExpectedData", SELECT_STORY1);
assertEquals("id", new Integer(1), (Integer) databaseData.getValue(0, "id"));
assertEquals("rel_id", releasePersistanceId, (Integer) databaseData.getValue(0, "rel_id"));
databaseData = getConnection().createQueryTable("ExpectedData", SELECT_STORY2);
assertEquals("id", new Integer(2), (Integer) databaseData.getValue(0, "id"));
assertEquals("rel_id", releasePersistanceId, (Integer) databaseData.getValue(0, "rel_id"));
}