TSK-549: case insensitive contraint on key/domain during creation of workbasket.

This commit is contained in:
Holger Hagen 2018-06-07 11:46:20 +02:00 committed by BerndBreier
parent 65dbb8c82c
commit 1ce9ed82d4
1 changed files with 20 additions and 0 deletions

View File

@ -145,6 +145,26 @@ public class CreateWorkbasketAccTest extends AbstractAccTest {
}
}
@WithAccessId(
userName = "user_1_2",
groupNames = {"businessadmin"})
@Test(expected = WorkbasketAlreadyExistException.class)
public void testThrowsExceptionIfWorkbasketWithCaseInsensitiveSameKeyDomainIsCreated()
throws SQLException, NotAuthorizedException, InvalidArgumentException, WorkbasketNotFoundException,
InvalidWorkbasketException, WorkbasketAlreadyExistException, DomainNotFoundException {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
Workbasket workbasket = workbasketService.newWorkbasket("X123456", "DOMAIN_A");
workbasket.setName("Personal Workbasket for UID X123456");
workbasket.setType(WorkbasketType.PERSONAL);
workbasket = workbasketService.createWorkbasket(workbasket);
Workbasket duplicateWorkbasketWithSmallX = workbasketService.newWorkbasket("x123456", "DOMAIN_A");
duplicateWorkbasketWithSmallX.setName("Personal Workbasket for UID X123456");
duplicateWorkbasketWithSmallX.setType(WorkbasketType.PERSONAL);
duplicateWorkbasketWithSmallX = workbasketService.createWorkbasket(duplicateWorkbasketWithSmallX);
}
@WithAccessId(
userName = "user_1_2",
groupNames = {"businessadmin"})