use of pro.taskana.WorkbasketSummary in project taskana by Taskana.
the class QueryWorkbasketAccTest method testQueryWorkbasketByNameStartsWithSortedByKeyDescending.
@WithAccessId(userName = "max")
@Test
public void testQueryWorkbasketByNameStartsWithSortedByKeyDescending() throws SQLException, NotAuthorizedException, InvalidArgumentException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery().nameLike("basxet%").orderByKey(desc).list();
Assert.assertEquals(10L, results.size());
// check sort order is correct
WorkbasketSummary previousSummary = null;
for (WorkbasketSummary wbSummary : results) {
if (previousSummary != null) {
Assert.assertTrue(wbSummary.getKey().compareToIgnoreCase(previousSummary.getKey()) <= 0);
}
previousSummary = wbSummary;
}
}
use of pro.taskana.WorkbasketSummary in project taskana by Taskana.
the class QueryWorkbasketAccTest method testQueryWorkbasketByKeyContains.
@WithAccessId(userName = "teamlead_1", groupNames = { "group_1" })
@Test
public void testQueryWorkbasketByKeyContains() throws SQLException, NotAuthorizedException, InvalidArgumentException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery().keyLike("%KSC%").list();
Assert.assertEquals(3L, results.size());
}
use of pro.taskana.WorkbasketSummary in project taskana by Taskana.
the class QueryWorkbasketAccTest method testQueryWorkbasketByMultipleKeysWithUnknownKey.
@WithAccessId(userName = "teamlead_1", groupNames = { "group_1" })
@Test
public void testQueryWorkbasketByMultipleKeysWithUnknownKey() throws SQLException, NotAuthorizedException, InvalidArgumentException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery().keyIn("GPK_KSC_1", "GPK_Ksc", "GPK_KSC_3").list();
Assert.assertEquals(2L, results.size());
}
use of pro.taskana.WorkbasketSummary in project taskana by Taskana.
the class QueryWorkbasketAccTest method testQueryWorkbasketByKey.
@WithAccessId(userName = "teamlead_1", groupNames = { "group_1" })
@Test
public void testQueryWorkbasketByKey() throws SQLException, NotAuthorizedException, InvalidArgumentException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery().keyIn("GPK_KSC").list();
Assert.assertEquals(1L, results.size());
}
use of pro.taskana.WorkbasketSummary in project taskana by Taskana.
the class QueryWorkbasketAccTest method testQueryWorkbasketByKeyOrNameContainsIgnoreCase.
@WithAccessId(userName = "teamlead_1", groupNames = { "group_1" })
@Test
public void testQueryWorkbasketByKeyOrNameContainsIgnoreCase() throws SQLException, NotAuthorizedException, InvalidArgumentException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery().keyOrNameLike("%kSc%").list();
Assert.assertEquals(9L, results.size());
}
Aggregations