use of com.instructure.canvasapi2.models.ScheduleItem in project instructure-android by instructure.
the class TodoListRecyclerAdapterTest method testAreContentsTheSame_DifferentTitleFromSchedule.
@Test
public void testAreContentsTheSame_DifferentTitleFromSchedule() {
ToDo item = new ToDo();
ScheduleItem scheduleItem = new ScheduleItem();
scheduleItem.setTitle("item");
item.setScheduleItem(scheduleItem);
ToDo item1 = new ToDo();
ScheduleItem scheduleItem1 = new ScheduleItem();
scheduleItem1.setTitle("item1");
item1.setScheduleItem(scheduleItem1);
assertFalse(mAdapter.createItemCallback().areContentsTheSame(item, item1));
}
use of com.instructure.canvasapi2.models.ScheduleItem in project instructure-android by instructure.
the class TodoListRecyclerAdapterTest method testAreContentsTheSame_SameTitleFromSchedule.
@Test
public void testAreContentsTheSame_SameTitleFromSchedule() {
ToDo item = new ToDo();
ScheduleItem scheduleItem = new ScheduleItem();
scheduleItem.setTitle("item");
item.setScheduleItem(scheduleItem);
assertTrue(mAdapter.createItemCallback().areContentsTheSame(item, item));
}
use of com.instructure.canvasapi2.models.ScheduleItem in project instructure-android by instructure.
the class CalendarEventManager method getCalendarEvents.
public static void getCalendarEvents(CalendarEventAPI.CalendarEventType type, RestParams params, String startDate, String endDate, List<String> canvasContexts, StatusCallback<List<ScheduleItem>> callback) {
if (isTesting() || mTesting) {
CalendarEventManager_Test.getCalendarEvents(callback);
} else {
RestBuilder adapter = new RestBuilder(callback);
CalendarEventAPI.getCalendarEvents(true, type, startDate, endDate, canvasContexts, adapter, callback, params);
}
}
use of com.instructure.canvasapi2.models.ScheduleItem in project instructure-android by instructure.
the class CalendarEventManager method getCalendarEventAirwolf.
public static void getCalendarEventAirwolf(String airwolfDomain, String parentId, String studentId, String eventId, StatusCallback<ScheduleItem> callback) {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().withShouldIgnoreToken(false).withPerPageQueryParam(false).withDomain(airwolfDomain).withAPIVersion("").build();
CalendarEventAPI.getCalendarEventAirwolf(parentId, studentId, eventId, adapter, callback, params);
}
use of com.instructure.canvasapi2.models.ScheduleItem in project instructure-android by instructure.
the class CalendarEventManager method createCalendarEvent.
public static void createCalendarEvent(@NonNull String contextCode, @NonNull String title, @NonNull String description, @NonNull String startDate, @NonNull String endDate, @NonNull String location, @NonNull StatusCallback<ScheduleItem> callback) {
if (isTesting() || mTesting) {
// TODO
} else {
RestBuilder adapter = new RestBuilder(callback);
RestParams params = new RestParams.Builder().build();
CalendarEventAPI.createCalendarEvent(contextCode, title, description, startDate, endDate, location, adapter, params, callback);
}
}
Aggregations