use of pro.taskana.impl.WorkbasketSummaryImpl in project taskana by Taskana.
the class TaskServiceImplIntExplicitTest method createTaskShouldThrowWorkbasketNotFoundException.
@WithAccessId(userName = "Elena", groupNames = { "businessadmin" })
@Test(expected = WorkbasketNotFoundException.class)
public void createTaskShouldThrowWorkbasketNotFoundException() throws NotAuthorizedException, WorkbasketNotFoundException, ClassificationNotFoundException, SQLException, ClassificationAlreadyExistException, TaskAlreadyExistException, InvalidWorkbasketException, InvalidArgumentException, WorkbasketAlreadyExistException, DomainNotFoundException {
Connection connection = dataSource.getConnection();
taskanaEngineImpl.setConnection(connection);
generateSampleAccessItems();
Task test = this.generateDummyTask();
((WorkbasketSummaryImpl) (test.getWorkbasketSummary())).setId("2");
taskServiceImpl.createTask(test);
}
use of pro.taskana.impl.WorkbasketSummaryImpl in project taskana by Taskana.
the class WorkbasketSummaryMapperTest method workbasketSummaryToResource.
@Test
public void workbasketSummaryToResource() throws WorkbasketNotFoundException, NotAuthorizedException {
// given
WorkbasketSummaryImpl workbasketSummary = (WorkbasketSummaryImpl) workbasketService.newWorkbasket("1", "DOMAIN_A").asSummary();
workbasketSummary.setDescription("WorkbasketSummaryImplTes");
workbasketSummary.setId("1");
workbasketSummary.setName("WorkbasketSummary");
workbasketSummary.setOrgLevel1("Org1");
workbasketSummary.setOrgLevel2("Org2");
workbasketSummary.setOrgLevel3("Org3");
workbasketSummary.setOrgLevel4("Org4");
workbasketSummary.setOwner("Lars");
workbasketSummary.setType(WorkbasketType.PERSONAL);
// when
WorkbasketSummaryResource workbasketSummaryResource = workbasketSummaryMapper.toResource(workbasketSummary);
// then
Assert.assertEquals(workbasketSummary.getDescription(), workbasketSummaryResource.description);
Assert.assertEquals(workbasketSummary.getDomain(), workbasketSummaryResource.domain);
Assert.assertEquals(workbasketSummary.getId(), workbasketSummaryResource.workbasketId);
Assert.assertEquals(workbasketSummary.getKey(), workbasketSummaryResource.key);
Assert.assertEquals(workbasketSummary.getName(), workbasketSummaryResource.name);
Assert.assertEquals(workbasketSummary.getOrgLevel1(), workbasketSummaryResource.orgLevel1);
Assert.assertEquals(workbasketSummary.getOrgLevel2(), workbasketSummaryResource.orgLevel2);
Assert.assertEquals(workbasketSummary.getOrgLevel3(), workbasketSummaryResource.orgLevel3);
Assert.assertEquals(workbasketSummary.getOrgLevel4(), workbasketSummaryResource.orgLevel4);
Assert.assertEquals(workbasketSummary.getOwner(), workbasketSummaryResource.owner);
Assert.assertEquals(workbasketSummary.getType(), workbasketSummaryResource.type);
}
Aggregations