Search in sources :

Example 1 with WorkbasketAccessItemQuery

use of pro.taskana.WorkbasketAccessItemQuery in project taskana by Taskana.

the class QueryWorkbasketAccessItemsAccTest method testQueryAccessItemsForAccessIdsOrderedAscending.

@WithAccessId(userName = "dummy", groupNames = { "businessadmin" })
@Test
public void testQueryAccessItemsForAccessIdsOrderedAscending() throws SQLException, NotAuthorizedException, InvalidArgumentException {
    WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
    WorkbasketAccessItemQuery query = workbasketService.createWorkbasketAccessItemQuery().accessIdIn("user_1_1", "group_1").orderByAccessId(desc).orderByWorkbasketId(desc);
    List<WorkbasketAccessItem> results = query.list();
    long count = query.count();
    Assert.assertEquals(8L, results.size());
    Assert.assertEquals(results.size(), count);
    Assert.assertEquals("WAI:100000000000000000000000000000000003", results.get(0).getId());
}
Also used : WorkbasketService(pro.taskana.WorkbasketService) WorkbasketAccessItem(pro.taskana.WorkbasketAccessItem) WorkbasketAccessItemQuery(pro.taskana.WorkbasketAccessItemQuery) AbstractAccTest(acceptance.AbstractAccTest) Test(org.junit.Test) WithAccessId(pro.taskana.security.WithAccessId)

Aggregations

AbstractAccTest (acceptance.AbstractAccTest)1 Test (org.junit.Test)1 WorkbasketAccessItem (pro.taskana.WorkbasketAccessItem)1 WorkbasketAccessItemQuery (pro.taskana.WorkbasketAccessItemQuery)1 WorkbasketService (pro.taskana.WorkbasketService)1 WithAccessId (pro.taskana.security.WithAccessId)1