use of pro.taskana.WorkbasketService in project taskana by Taskana.
the class DistributionTargetsAccTest method testQueryDistributionSourcesThrowsWorkbasketNotFound.
@WithAccessId(userName = "user_2_2", groupNames = { "group_1", "group_2" })
@Test(expected = WorkbasketNotFoundException.class)
public void testQueryDistributionSourcesThrowsWorkbasketNotFound() throws NotAuthorizedException, WorkbasketNotFoundException, InvalidWorkbasketException, SQLException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> distributionSources = workbasketService.getDistributionSources("WBI:10dasgibtsdochnicht00000000000000004");
assertEquals(2, distributionSources.size());
}
use of pro.taskana.WorkbasketService in project taskana by Taskana.
the class QueryWorkbasketAccTest method testQueryWorkbasketByModified.
@WithAccessId(userName = "teamlead_1", groupNames = { "group_1" })
@Test
public void testQueryWorkbasketByModified() throws SQLException, NotAuthorizedException, InvalidArgumentException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery().modifiedWithin(todaysInterval()).list();
Assert.assertEquals(8L, results.size());
}
use of pro.taskana.WorkbasketService in project taskana by Taskana.
the class QueryWorkbasketAccTest method testQueryWorkbasketValuesForColumnName.
@WithAccessId(userName = "teamlead_1", groupNames = { "group_1" })
@Test
public void testQueryWorkbasketValuesForColumnName() throws NotAuthorizedException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<String> columnValueList = workbasketService.createWorkbasketQuery().listValues("NAME", null);
assertNotNull(columnValueList);
assertEquals(9, columnValueList.size());
columnValueList = workbasketService.createWorkbasketQuery().nameLike("%korb%").orderByName(asc).listValues("NAME", // will override
SortDirection.DESCENDING);
assertNotNull(columnValueList);
assertEquals(3, columnValueList.size());
}
use of pro.taskana.WorkbasketService in project taskana by Taskana.
the class QueryWorkbasketAccTest method testQueryWorkbasketByDescription.
@WithAccessId(userName = "teamlead_1", groupNames = { "group_1" })
@Test
public void testQueryWorkbasketByDescription() throws SQLException, NotAuthorizedException, InvalidArgumentException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery().descriptionLike("%ppk%", "%gruppen%").orderByType(desc).orderByDescription(asc).list();
Assert.assertEquals(9L, results.size());
}
use of pro.taskana.WorkbasketService in project taskana by Taskana.
the class QueryWorkbasketAccTest method testQueryWorkbasketByNameContains.
@WithAccessId(userName = "teamlead_1", groupNames = { "group_1" })
@Test
public void testQueryWorkbasketByNameContains() throws SQLException, NotAuthorizedException, InvalidArgumentException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery().nameLike("%Teamlead%", "%Gruppenpostkorb KSC%").list();
Assert.assertEquals(5L, results.size());
}
Aggregations