test for dataproivder query

Change-Id: I615f4d0942bed72d988ae7da77f9492fc6649fda
This commit is contained in:
joha-asc 2011-07-20 14:55:35 +02:00
parent 9753769f45
commit af01fdce23

@ -49,7 +49,7 @@ public class TestWebNotificationDaoJPA {
WebNotification notification = new WebNotification();
notification.setInfoText("Test");
notification.setRestRelativeURL("/test/");
notification.setUrl("/test/");
notification.setUser(user);
notificationDao.save(notification);
@ -63,11 +63,18 @@ public class TestWebNotificationDaoJPA {
Assert.assertEquals(1, notificationDao.getWebNotifications(user).size());
}
@Test
@Transactional
@Rollback
public void testGetNotificationsFirstCount() {
Assert.assertEquals(1, notificationDao.getWebNotifications(user, 0, 1).size());
}
@Test
@Transactional
@Rollback
public void testGetNumberOfNotifications() {
Assert.assertEquals(1, notificationDao.getNumberOfWebNotifications(user));
Assert.assertEquals(1, notificationDao.getCountOfWebNotifications(user));
}