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