TSK-626: Correct mistakes in AttachmentSummary
This commit is contained in:
parent
85c9a7ed8a
commit
cd2110f1d7
|
@ -227,7 +227,7 @@ public class AttachmentSummaryImpl implements AttachmentSummary {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("AttachmentImpl [id=");
|
||||
builder.append("AttachmentSummaryImpl [id=");
|
||||
builder.append(id);
|
||||
builder.append(", taskId=");
|
||||
builder.append(taskId);
|
||||
|
|
|
@ -38,7 +38,7 @@ public class TaskSummaryImpl implements TaskSummary {
|
|||
private boolean isRead;
|
||||
private boolean isTransferred;
|
||||
// All objects have to be serializable
|
||||
private List<AttachmentSummary> attachmentSummaries;
|
||||
private List<AttachmentSummary> attachmentSummaries = new ArrayList<>();
|
||||
private String custom1;
|
||||
private String custom2;
|
||||
private String custom3;
|
||||
|
|
|
@ -3,6 +3,7 @@ package acceptance.task;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -57,7 +58,19 @@ public class QueryTaskWithAttachment extends AbstractAccTest {
|
|||
assertEquals(20, tasks.size());
|
||||
|
||||
List<AttachmentSummary> attachmentSummaries = tasks.get(0).getAttachmentSummaries();
|
||||
assertEquals(null, attachmentSummaries);
|
||||
assertNotNull(attachmentSummaries);
|
||||
assertTrue(attachmentSummaries.isEmpty());
|
||||
}
|
||||
|
||||
@WithAccessId(
|
||||
userName = "user_1_1",
|
||||
groupNames = {"group_1"})
|
||||
@Test
|
||||
public void testIfNewTaskHasEmptyAttachmentList() {
|
||||
TaskService taskService = taskanaEngine.getTaskService();
|
||||
Task task = taskService.newTask("WBI:100000000000000000000000000000000006");
|
||||
assertNotNull(task.getAttachments());
|
||||
assertNotNull(task.asSummary().getAttachmentSummaries());
|
||||
}
|
||||
|
||||
@WithAccessId(
|
||||
|
|
Loading…
Reference in New Issue