Search in sources :

Example 21 with ClassificationService

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

the class QueryClassificationAccTest method testGetClassificationsWithCustom1Like.

@Test
public void testGetClassificationsWithCustom1Like() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
    ClassificationService classificationService = taskanaEngine.getClassificationService();
    List<ClassificationSummary> classifications = classificationService.createClassificationQuery().custom1Like("%RVNR%").domainIn("DOMAIN_A").typeIn("TASK").list();
    assertNotNull(classifications);
    assertEquals(12, classifications.size());
}
Also used : ClassificationSummary(pro.taskana.ClassificationSummary) ClassificationService(pro.taskana.ClassificationService) AbstractAccTest(acceptance.AbstractAccTest) Test(org.junit.Test)

Example 22 with ClassificationService

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

the class ClassificationQueryAccTest method testFindClassificationsByDomainUnauthenticated.

@Test
public void testFindClassificationsByDomainUnauthenticated() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
    ClassificationService classificationService = taskanaEngine.getClassificationService();
    List<ClassificationSummary> classificationSummaryList = classificationService.createClassificationQuery().domainIn("DOMAIN_A").list();
    assertNotNull(classificationSummaryList);
    assertEquals(17, classificationSummaryList.size());
}
Also used : ClassificationSummary(pro.taskana.ClassificationSummary) ClassificationService(pro.taskana.ClassificationService) AbstractAccTest(acceptance.AbstractAccTest) Test(org.junit.Test)

Example 23 with ClassificationService

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

the class ClassificationQueryAccTest method testFindClassificationsByDomainBusinessAdmin.

@WithAccessId(userName = "businessadmin")
@Test
public void testFindClassificationsByDomainBusinessAdmin() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
    ClassificationService classificationService = taskanaEngine.getClassificationService();
    List<ClassificationSummary> classificationSummaryList = classificationService.createClassificationQuery().domainIn("DOMAIN_A").list();
    assertNotNull(classificationSummaryList);
    assertEquals(17, classificationSummaryList.size());
}
Also used : ClassificationSummary(pro.taskana.ClassificationSummary) ClassificationService(pro.taskana.ClassificationService) AbstractAccTest(acceptance.AbstractAccTest) Test(org.junit.Test) WithAccessId(pro.taskana.security.WithAccessId)

Example 24 with ClassificationService

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

the class GetClassificationAccTest method testGetOneClassificationForDomainAndGetClassificationFromRootDomain.

@Test
public void testGetOneClassificationForDomainAndGetClassificationFromRootDomain() throws ClassificationNotFoundException {
    ClassificationService classificationService = taskanaEngine.getClassificationService();
    Classification classification = classificationService.getClassification("L10000", "DOMAIN_B");
    Assert.assertNotNull(classification);
    Assert.assertEquals("", classification.getDomain());
    Assert.assertEquals(999L, classification.getPriority());
}
Also used : Classification(pro.taskana.Classification) ClassificationService(pro.taskana.ClassificationService) AbstractAccTest(acceptance.AbstractAccTest) Test(org.junit.Test)

Example 25 with ClassificationService

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

the class GetClassificationAccTest method testGetOneClassificationForDomain.

@Test
public void testGetOneClassificationForDomain() throws ClassificationNotFoundException {
    ClassificationService classificationService = taskanaEngine.getClassificationService();
    Classification classification = classificationService.getClassification("T6310", "DOMAIN_A");
    Assert.assertNotNull(classification);
}
Also used : Classification(pro.taskana.Classification) ClassificationService(pro.taskana.ClassificationService) AbstractAccTest(acceptance.AbstractAccTest) Test(org.junit.Test)

Aggregations

AbstractAccTest (acceptance.AbstractAccTest)32 Test (org.junit.Test)32 ClassificationService (pro.taskana.ClassificationService)32 ClassificationSummary (pro.taskana.ClassificationSummary)19 Classification (pro.taskana.Classification)10 WithAccessId (pro.taskana.security.WithAccessId)6 SQLException (java.sql.SQLException)2 Instant (java.time.Instant)2 List (java.util.List)2 Collectors (java.util.stream.Collectors)2 Assert.assertEquals (org.junit.Assert.assertEquals)2 Assert.assertNotNull (org.junit.Assert.assertNotNull)2 ClassificationNotFoundException (pro.taskana.exceptions.ClassificationNotFoundException)2 InvalidArgumentException (pro.taskana.exceptions.InvalidArgumentException)2 NotAuthorizedException (pro.taskana.exceptions.NotAuthorizedException)2 ArrayList (java.util.ArrayList)1 Ignore (org.junit.Ignore)1 Task (pro.taskana.Task)1 TaskService (pro.taskana.TaskService)1 DaysToWorkingDaysConverter (pro.taskana.impl.DaysToWorkingDaysConverter)1