use of org.jbpm.services.task.impl.model.CommentImpl in project jbpm by kiegroup.
the class CollectionUtils method readCommentList.
public static List<Comment> readCommentList(ObjectInput in) throws IOException, ClassNotFoundException {
int size = in.readInt();
List<Comment> list = new ArrayList<Comment>(size);
for (int i = 0; i < size; i++) {
Comment item = new CommentImpl();
item.readExternal(in);
list.add(item);
}
return list;
}
use of org.jbpm.services.task.impl.model.CommentImpl in project jbpm by kiegroup.
the class AbstractTaskSerializationTest method jaxbCommentTest.
@Test
public void jaxbCommentTest() throws Exception {
Assume.assumeFalse(getType().equals(TestType.YAML));
CommentImpl comment = new CommentImpl();
comment.setAddedAt(new Date());
comment.setAddedBy(new UserImpl("user"));
comment.setId(23l);
comment.setText("ILLUMINATI!");
JaxbComment jaxbComment = new JaxbComment(comment);
assertEquals("added at", comment.getAddedAt(), jaxbComment.getAddedAt());
assertEquals("added by", comment.getAddedBy().getId(), jaxbComment.getAddedById());
assertEquals("added by", comment.getAddedBy().getId(), jaxbComment.getAddedBy().getId());
assertEquals("id", comment.getId(), jaxbComment.getId());
assertEquals("text", comment.getText(), jaxbComment.getText());
JaxbComment copyJaxbComment = testRoundTrip(jaxbComment);
Assertions.assertThat(jaxbComment).isEqualToComparingFieldByFieldRecursively(copyJaxbComment);
}
Aggregations