This commit is contained in:
Frederic Debuire
2008-02-25 16:53:44 +00:00
parent 6b32781d51
commit 20bf86040e

View File

@@ -144,6 +144,13 @@ public class EvaluationManagerTest {
public void removeReportTest(){
Report report = em.addReport(article.getId(), "report a virer", "commentAuthor", new ArrayList<Rating>(), "evaluationManagerTest");
int reportId = report.getId();
Criterion c = em.addCriterion("toto", 1, 5, confId);
Rating r = em.addRating(2, c.getId(), reportId);
List<Rating> listRating = em.getRatingForReport(reportId);
for (Rating r2 : listRating) {
em.removeRating(r2.getCriterion(), r2.getReport());
}
em.removeReport(report.getId());
assertNull(em.getReport(reportId));
}