Test..
This commit is contained in:
@@ -144,6 +144,13 @@ public class EvaluationManagerTest {
|
|||||||
public void removeReportTest(){
|
public void removeReportTest(){
|
||||||
Report report = em.addReport(article.getId(), "report a virer", "commentAuthor", new ArrayList<Rating>(), "evaluationManagerTest");
|
Report report = em.addReport(article.getId(), "report a virer", "commentAuthor", new ArrayList<Rating>(), "evaluationManagerTest");
|
||||||
int reportId = report.getId();
|
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());
|
em.removeReport(report.getId());
|
||||||
assertNull(em.getReport(reportId));
|
assertNull(em.getReport(reportId));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user