TSK-130: acceptance tests for updating tasks added.
This commit is contained in:
parent
d1355f83c0
commit
b2d6db79f8
|
|
@ -9,6 +9,7 @@ import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
import acceptance.AbstractAccTest;
|
import acceptance.AbstractAccTest;
|
||||||
|
import pro.taskana.TaskService;
|
||||||
import pro.taskana.exceptions.ClassificationNotFoundException;
|
import pro.taskana.exceptions.ClassificationNotFoundException;
|
||||||
import pro.taskana.exceptions.InvalidArgumentException;
|
import pro.taskana.exceptions.InvalidArgumentException;
|
||||||
import pro.taskana.exceptions.InvalidWorkbasketException;
|
import pro.taskana.exceptions.InvalidWorkbasketException;
|
||||||
|
|
@ -99,6 +100,66 @@ public class UpdateTaskAccTest extends AbstractAccTest {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore
|
||||||
|
@WithAccessId(
|
||||||
|
userName = "user_1_1",
|
||||||
|
groupNames = { "group_1" })
|
||||||
|
@Test
|
||||||
|
public void testUpdateClassificationOfTask()
|
||||||
|
throws SQLException, NotAuthorizedException, InvalidArgumentException, ClassificationNotFoundException,
|
||||||
|
WorkbasketNotFoundException, TaskAlreadyExistException, InvalidWorkbasketException {
|
||||||
|
|
||||||
|
// TaskService taskService = taskanaEngine.getTaskService();
|
||||||
|
// Task with classification T2000
|
||||||
|
// Task task = taskService.getTask("TKI:000000000000000000000000000000000000");
|
||||||
|
// task.setClassificationKey("T2100"));
|
||||||
|
// Task updatedTask = taskService.updateTask(task);
|
||||||
|
//
|
||||||
|
// assertNotNull(updatedTask);
|
||||||
|
// assertEquals("T2100", updatedTask.getClassification().getKey());
|
||||||
|
// assertNotEquals(updatedTask.getCreated(), updatedTask.getModified());
|
||||||
|
// assertEquals(22, updatedTask.getPriority());
|
||||||
|
// assertEquals(task.getPlanned(), updatedTask.getPlanned());
|
||||||
|
// assertEquals(???, updatedTask.getDue()); // should be one day later
|
||||||
|
// assertEquals("T-Vertragstermin VERA", updatedTask.getName());
|
||||||
|
// assertEquals("T-Vertragstermin VERA", updatedTask.getDescription());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Ignore
|
||||||
|
@WithAccessId(
|
||||||
|
userName = "user_1_1",
|
||||||
|
groupNames = { "group_1" })
|
||||||
|
@Test
|
||||||
|
public void testCustomPropertiesOfTask()
|
||||||
|
throws SQLException, NotAuthorizedException, InvalidArgumentException, ClassificationNotFoundException,
|
||||||
|
WorkbasketNotFoundException, TaskAlreadyExistException, InvalidWorkbasketException {
|
||||||
|
|
||||||
|
// TaskService taskService = taskanaEngine.getTaskService();
|
||||||
|
// Task with classification T2000
|
||||||
|
// Task task = taskService.getTask("TKI:000000000000000000000000000000000000");
|
||||||
|
// task.setCustomProperty1("T2100"));
|
||||||
|
// ...
|
||||||
|
// Task updatedTask = taskService.updateTask(task);
|
||||||
|
//
|
||||||
|
// assertNotNull(updatedTask);
|
||||||
|
// meaningful assertions
|
||||||
|
}
|
||||||
|
|
||||||
|
@Ignore
|
||||||
|
@WithAccessId(
|
||||||
|
userName = "user_1_1",
|
||||||
|
groupNames = { "group_1" })
|
||||||
|
// @Test(expected = InvalidOperationException.class)
|
||||||
|
public void testUpdateOfWorkbasketKeyNotAllowed()
|
||||||
|
throws SQLException, NotAuthorizedException, InvalidArgumentException, ClassificationNotFoundException,
|
||||||
|
WorkbasketNotFoundException, TaskAlreadyExistException, InvalidWorkbasketException {
|
||||||
|
|
||||||
|
TaskService taskService = taskanaEngine.getTaskService();
|
||||||
|
// Task task = taskService.getTask("TKI:000000000000000000000000000000000000");
|
||||||
|
// task.setWorkbasketKey("USER_2_2");
|
||||||
|
// Task updatedTask = taskService.updateTask(task);
|
||||||
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void cleanUpClass() {
|
public static void cleanUpClass() {
|
||||||
FileUtils.deleteRecursive("~/data", true);
|
FileUtils.deleteRecursive("~/data", true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue