TSK-756b - Comments from Holger
This commit is contained in:
parent
09f3fb3f12
commit
b4ec24e705
|
@ -85,7 +85,7 @@ public class CreateTaskAccTest extends AbstractAccTest {
|
|||
@WithAccessId(
|
||||
userName = "user_1_1",
|
||||
groupNames = {"group_1"})
|
||||
@Test
|
||||
@Test(expected = TaskAlreadyExistException.class)
|
||||
public void testIdempotencyOfTaskCreation()
|
||||
throws NotAuthorizedException, InvalidArgumentException, ClassificationNotFoundException,
|
||||
WorkbasketNotFoundException, TaskAlreadyExistException {
|
||||
|
@ -115,16 +115,11 @@ public class CreateTaskAccTest extends AbstractAccTest {
|
|||
assertEquals(false, createdTask.isRead());
|
||||
assertEquals(false, createdTask.isTransferred());
|
||||
|
||||
try {
|
||||
newTask = taskService.newTask("USER_1_1", "DOMAIN_A");
|
||||
newTask.setExternalId("MyExternalId");
|
||||
newTask.setClassificationKey("T2100");
|
||||
newTask.setPrimaryObjRef(createObjectReference("COMPANY_A", "SYSTEM_A", "INSTANCE_A", "VNR", "1234567"));
|
||||
taskService.createTask(newTask);
|
||||
assertTrue("This line of code must not be reached", false);
|
||||
} catch (TaskAlreadyExistException ex) {
|
||||
assertTrue("correctly enforced Idempotency", true);
|
||||
}
|
||||
newTask = taskService.newTask("USER_1_1", "DOMAIN_A");
|
||||
newTask.setExternalId("MyExternalId");
|
||||
newTask.setClassificationKey("T2100");
|
||||
newTask.setPrimaryObjRef(createObjectReference("COMPANY_A", "SYSTEM_A", "INSTANCE_A", "VNR", "1234567"));
|
||||
taskService.createTask(newTask);
|
||||
}
|
||||
|
||||
@WithAccessId(
|
||||
|
|
Loading…
Reference in New Issue