use of org.opencastproject.usertracking.api.UserActionList in project opencast by opencast.
the class UserTrackingServiceImplTest method verifyUserActionListsByTypeAndMediapackage.
/**
* Gets the user action list based on type and mediapackage, performs some asserts
* @throws Exception
*/
private void verifyUserActionListsByTypeAndMediapackage(String type, String mp, int count, int offset, int limit, int total) {
UserActionList ual = service.getUserActionsByTypeAndMediapackageId(type, mp, offset, limit);
Assert.assertEquals(limit, ual.getLimit());
Assert.assertEquals(offset, ual.getOffset());
Assert.assertEquals(total, ual.getTotal());
Assert.assertEquals(count, ual.getUserActions().size());
// This method does the same thing, except it orders by creation date.
ual = service.getUserActionsByTypeAndMediapackageIdByDate(type, mp, offset, limit);
Assert.assertEquals(limit, ual.getLimit());
Assert.assertEquals(offset, ual.getOffset());
Assert.assertEquals(total, ual.getTotal());
Assert.assertEquals(count, ual.getUserActions().size());
// This method does the same thing, except it orders by the reverse of the creation date.
ual = service.getUserActionsByTypeAndMediapackageIdByDescendingDate(type, mp, offset, limit);
Assert.assertEquals(limit, ual.getLimit());
Assert.assertEquals(offset, ual.getOffset());
Assert.assertEquals(total, ual.getTotal());
Assert.assertEquals(count, ual.getUserActions().size());
}
use of org.opencastproject.usertracking.api.UserActionList in project opencast by opencast.
the class UserTrackingServiceImplTest method verifyUserActionListsByDay.
/**
* Gets the user action list based on date, performs some asserts
* @throws Exception
*/
private void verifyUserActionListsByDay(String day, int count, int offset, int limit, int total) {
UserActionList ual = service.getUserActionsByDay(day, offset, limit);
Assert.assertEquals(limit, ual.getLimit());
Assert.assertEquals(offset, ual.getOffset());
Assert.assertEquals(total, ual.getTotal());
Assert.assertEquals(count, ual.getUserActions().size());
}
use of org.opencastproject.usertracking.api.UserActionList in project opencast by opencast.
the class UserTrackingServiceImplTest method verifyUserActionLists.
/**
* Gets the user action list, performs some asserts
* @throws Exception
*/
private void verifyUserActionLists(int count, int offset, int limit, int total) {
UserActionList ual = service.getUserActions(offset, limit);
Assert.assertEquals(limit, ual.getLimit());
Assert.assertEquals(offset, ual.getOffset());
Assert.assertEquals(total, ual.getTotal());
Assert.assertEquals(count, ual.getUserActions().size());
}
use of org.opencastproject.usertracking.api.UserActionList in project opencast by opencast.
the class UserTrackingServiceImplTest method verifyUserActionListsByTypeAndDay.
/**
* Gets the user action list based on type and date, performs some asserts
* @throws Exception
*/
private void verifyUserActionListsByTypeAndDay(String type, String day, int count, int offset, int limit, int total) {
UserActionList ual = service.getUserActionsByTypeAndDay(type, day, offset, limit);
Assert.assertEquals(limit, ual.getLimit());
Assert.assertEquals(offset, ual.getOffset());
Assert.assertEquals(total, ual.getTotal());
Assert.assertEquals(count, ual.getUserActions().size());
}
Aggregations