use of com.instructure.canvasapi2.models.Message in project instructure-android by instructure.
the class UserManager_Test method sendPasswordResetForParentAirwolf.
public static void sendPasswordResetForParentAirwolf(String airwolfDomain, RestBuilder adapter, RestParams params, String userName, StatusCallback<ResponseBody> callback) {
adapter.setStatusCallback(callback);
Response response = new Response.Builder().code(200).message("success").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "success".getBytes())).addHeader("content-type", "application/json").build();
retrofit2.Response response1 = retrofit2.Response.success(response);
callback.onResponse(response1, new LinkHeaders(), ApiType.API);
}
use of com.instructure.canvasapi2.models.Message in project instructure-android by instructure.
the class UserManager_Test method getStudentsForParentAirwolf.
public static void getStudentsForParentAirwolf(String airwolfDomain, RestBuilder adapter, RestParams params, String parentId, StatusCallback<List<Student>> callback) {
adapter.setStatusCallback(callback);
Response response = new Response.Builder().code(200).message("success").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "success".getBytes())).addHeader("content-type", "application/json").build();
retrofit2.Response response1 = retrofit2.Response.success(response);
callback.onResponse(response1, new LinkHeaders(), ApiType.API);
}
use of com.instructure.canvasapi2.models.Message in project instructure-android by instructure.
the class ConversationTest method getLastMessagePreview.
@Test
public void getLastMessagePreview() {
Conversation conversation = new Conversation();
conversation.setDeletedString("conversation deleted");
conversation.setLastMessage("last message");
conversation.setDeleted(false);
assertEquals("last message", conversation.getLastMessagePreview());
}
use of com.instructure.canvasapi2.models.Message in project instructure-android by instructure.
the class DiscussionTopicHeaderTest method convertToDiscussionEntryTest_Message.
@Test
public void convertToDiscussionEntryTest_Message() throws Exception {
String message = "here is a message";
DiscussionTopicHeader header = new DiscussionTopicHeader();
header.setMessage(message);
DiscussionEntry entry = header.convertToDiscussionEntry("graded", "points");
assertEquals(header.getMessage(), entry.getMessage());
}
use of com.instructure.canvasapi2.models.Message in project instructure-android by instructure.
the class AccountNotificationManager_Test method getAccountNotificationForStudent.
public static void getAccountNotificationForStudent(String parentId, String studentId, String accountNotificationId, StatusCallback<AccountNotification> callback) {
Response response = new Response.Builder().code(200).message("todo").protocol(Protocol.HTTP_1_0).body(ResponseBody.create(MediaType.parse("application/json"), "todo".getBytes())).addHeader("content-type", "application/json").build();
AccountNotification item = new AccountNotification();
retrofit2.Response<AccountNotification> response1 = retrofit2.Response.success(item, response);
callback.onResponse(response1, new LinkHeaders(), ApiType.CACHE);
}
Aggregations