Search in sources :

Example 16 with Assignment

use of com.instructure.canvasapi2.models.Assignment in project instructure-android by instructure.

the class AssignmentDateListRecyclerAdapterTest method testAreContentsTheSame_sameName.

@Test
public void testAreContentsTheSame_sameName() {
    Assignment assignment = new Assignment();
    assignment.setName("Assign1");
    assertTrue(mAdapter.createItemCallback().areContentsTheSame(assignment, assignment));
}
Also used : Assignment(com.instructure.canvasapi2.models.Assignment) Test(org.junit.Test)

Example 17 with Assignment

use of com.instructure.canvasapi2.models.Assignment in project instructure-android by instructure.

the class AssignmentDateListRecyclerAdapterTest method testAreContentsTheSame_differentName.

@Test
public void testAreContentsTheSame_differentName() {
    Assignment assignment1 = new Assignment();
    assignment1.setName("Assign1");
    Assignment assignment2 = new Assignment();
    assignment2.setName("Assign2");
    assertFalse(mAdapter.createItemCallback().areContentsTheSame(assignment1, assignment2));
}
Also used : Assignment(com.instructure.canvasapi2.models.Assignment) Test(org.junit.Test)

Example 18 with Assignment

use of com.instructure.canvasapi2.models.Assignment in project instructure-android by instructure.

the class AssignmentGroupListRecyclerAdapterTest method testAreContentsTheSame_differentName.

@Test
public void testAreContentsTheSame_differentName() {
    Assignment assignment1 = new Assignment();
    assignment1.setName("Assign1");
    Assignment assignment2 = new Assignment();
    assignment2.setName("Assign2");
    assertFalse(mAdapter.createItemCallback().areContentsTheSame(assignment1, assignment2));
}
Also used : Assignment(com.instructure.canvasapi2.models.Assignment) Test(org.junit.Test)

Example 19 with Assignment

use of com.instructure.canvasapi2.models.Assignment in project instructure-android by instructure.

the class AssignmentGroupListRecyclerAdapterTest method testAreContentsTheSame_sameName.

@Test
public void testAreContentsTheSame_sameName() {
    Assignment assignment = new Assignment();
    assignment.setName("Assignment1");
    assertTrue(mAdapter.createItemCallback().areContentsTheSame(assignment, assignment));
}
Also used : Assignment(com.instructure.canvasapi2.models.Assignment) Test(org.junit.Test)

Example 20 with Assignment

use of com.instructure.canvasapi2.models.Assignment in project instructure-android by instructure.

the class CalendarListRecyclerAdapterTest method testAreContentsTheSame_sameAssignment.

@Test
public void testAreContentsTheSame_sameAssignment() {
    ScheduleItem scheduleItem1 = new ScheduleItem();
    scheduleItem1.setTitle("ScheduleItem1");
    scheduleItem1.setStartAt(new Date());
    Assignment assignment1 = new Assignment();
    assignment1.setDueAt(APIHelper.dateToString(new Date()));
    scheduleItem1.setAssignment(assignment1);
    assertTrue(mAdapter.createItemCallback().areContentsTheSame(scheduleItem1, scheduleItem1));
}
Also used : Assignment(com.instructure.canvasapi2.models.Assignment) ScheduleItem(com.instructure.canvasapi2.models.ScheduleItem) Date(java.util.Date) Test(org.junit.Test)

Aggregations

Assignment (com.instructure.canvasapi2.models.Assignment)62 Test (org.junit.Test)46 Submission (com.instructure.canvasapi2.models.Submission)25 Date (java.util.Date)18 ArrayList (java.util.ArrayList)15 View (android.view.View)10 RestBuilder (com.instructure.canvasapi2.builders.RestBuilder)10 Course (com.instructure.canvasapi2.models.Course)9 RestParams (com.instructure.canvasapi2.builders.RestParams)7 Bundle (android.os.Bundle)6 ScheduleItem (com.instructure.canvasapi2.models.ScheduleItem)6 LinkHeaders (com.instructure.canvasapi2.utils.LinkHeaders)6 Navigation (com.instructure.interactions.Navigation)5 DrawableRes (android.support.annotation.DrawableRes)4 AdapterView (android.widget.AdapterView)4 TextView (android.widget.TextView)4 Request (okhttp3.Request)4 Response (okhttp3.Response)4 Paint (android.graphics.Paint)3 Drawable (android.graphics.drawable.Drawable)3