use of pro.taskana.ClassificationService in project taskana by Taskana.
the class QueryClassificationWithPaginationAccTest method testPaginationThrowingExceptionWhenPageOutOfBounds.
/**
* Testcase only for DB2 users, because H2 doesn´t throw a Exception when the offset is set to high.<br>
* Using DB2 should throw a unchecked RuntimeException for a offset which is out of bounds.
*
* @throws NotAuthorizedException
*/
@Ignore
@Test(expected = TaskanaRuntimeException.class)
public void testPaginationThrowingExceptionWhenPageOutOfBounds() throws NotAuthorizedException {
ClassificationService classificationService = taskanaEngine.getClassificationService();
// entrypoint set outside result amount
int pageNumber = 5;
int pageSize = 10;
classificationService.createClassificationQuery().domainIn("DOMAIN_A").listPage(pageNumber, pageSize);
}
use of pro.taskana.ClassificationService in project taskana by Taskana.
the class QueryClassificationWithPaginationAccTest method testCountOfClassificationsQuery.
@Test
public void testCountOfClassificationsQuery() throws NotAuthorizedException {
ClassificationService classificationService = taskanaEngine.getClassificationService();
long count = classificationService.createClassificationQuery().domainIn("DOMAIN_A").count();
assertThat(count, equalTo(17L));
}
Aggregations