use of org.olat.modules.lecture.model.LectureParticipantSummaryImpl in project openolat by klemens.
the class LectureParticipantSummaryDAOTest method updateSummary.
@Test
public void updateSummary() {
RepositoryEntry entry = JunitTestHelper.createAndPersistRepositoryEntry();
Identity id = JunitTestHelper.createAndPersistIdentityAsRndUser("summary-3");
// null must be accepted
lectureParticipantSummaryDao.createSummary(entry, id, new Date());
dbInstance.commitAndCloseSession();
int numOfUpdatedRows = lectureParticipantSummaryDao.updateCalendarSynchronization(entry, id);
Assert.assertEquals(1, numOfUpdatedRows);
dbInstance.commitAndCloseSession();
LectureParticipantSummaryImpl summary = (LectureParticipantSummaryImpl) lectureParticipantSummaryDao.getSummary(entry, id);
Assert.assertNotNull(summary);
Assert.assertNotNull(summary.getKey());
Assert.assertTrue(summary.isCalendarSync());
Assert.assertNotNull(summary.getCalendarLastSyncDate());
}
Aggregations