use of com.instructure.canvasapi.model.Attachment in project instructure-android by instructure.
the class ConversationUnitTest method testMessage.
// Gets tested from testConversation()
public static void testMessage(Message message) {
assertNotNull(message);
if (message.getAttachments() != null) {
for (Attachment attachment : message.getAttachments()) {
assertNotNull(attachment);
assertTrue(attachment.getId() > 0);
assertNotNull(attachment.getDisplayName());
assertNotNull(attachment.getFilename());
assertNotNull(attachment.getMimeType());
assertNotNull(attachment.getUrl());
}
}
assertTrue(message.getAuthorID() > 0);
assertNotNull(message.getBody());
assertNotNull(message.getCreationDate());
assertTrue(message.getId() > 0);
if (message.getForwardedMessages() != null) {
for (Message replyMessage : message.getForwardedMessages()) {
testMessage(replyMessage);
}
}
}
Aggregations