use of org.olat.modules.portfolio.BinderUserInformations in project OpenOLAT by OpenOLAT.
the class BinderUserInformationsDAOTest method updateBinderUserInformations.
@Test
public void updateBinderUserInformations() {
Identity identity = JunitTestHelper.createAndPersistIdentityAsRndUser("bu-1");
BinderImpl binder = binderDao.createAndPersist("Binder infos", "Binder with one section.", null, null);
dbInstance.commitAndCloseSession();
// update the infos
binderUserInformationsDAO.updateBinderUserInformations(binder, identity);
dbInstance.commit();
// load the infos and check
BinderUserInformations infos = binderUserInformationsDAO.getBinderUserInfos(binder, identity);
Assert.assertNotNull(infos);
Assert.assertNotNull(infos.getKey());
Assert.assertNotNull(infos.getCreationDate());
Assert.assertNotNull(infos.getLastModified());
Assert.assertNotNull(infos.getInitialLaunch());
Assert.assertNotNull(infos.getRecentLaunch());
Assert.assertEquals(1, infos.getVisit());
Assert.assertEquals(binder, infos.getBinder());
Assert.assertEquals(identity, infos.getIdentity());
}
use of org.olat.modules.portfolio.BinderUserInformations in project openolat by klemens.
the class BinderUserInformationsDAOTest method updateBinderUserInformations.
@Test
public void updateBinderUserInformations() {
Identity identity = JunitTestHelper.createAndPersistIdentityAsRndUser("bu-1");
BinderImpl binder = binderDao.createAndPersist("Binder infos", "Binder with one section.", null, null);
dbInstance.commitAndCloseSession();
// update the infos
binderUserInformationsDAO.updateBinderUserInformations(binder, identity);
dbInstance.commit();
// load the infos and check
BinderUserInformations infos = binderUserInformationsDAO.getBinderUserInfos(binder, identity);
Assert.assertNotNull(infos);
Assert.assertNotNull(infos.getKey());
Assert.assertNotNull(infos.getCreationDate());
Assert.assertNotNull(infos.getLastModified());
Assert.assertNotNull(infos.getInitialLaunch());
Assert.assertNotNull(infos.getRecentLaunch());
Assert.assertEquals(1, infos.getVisit());
Assert.assertEquals(binder, infos.getBinder());
Assert.assertEquals(identity, infos.getIdentity());
}
Aggregations