use of com.instructure.canvasapi2.models.Assignment in project instructure-android by instructure.
the class GradesListRecyclerAdapterTest method testAreContentsTheSame_SameWithSubmissionNullGrade.
@Test
public void testAreContentsTheSame_SameWithSubmissionNullGrade() {
Assignment assignment1 = new Assignment();
assignment1.setName("assignment");
assignment1.setPointsPossible(0.0);
Submission submission1 = new Submission();
submission1.setGrade("A");
assignment1.setSubmission(submission1);
Assignment assignment2 = new Assignment();
assignment2.setName("assignment1");
assignment2.setPointsPossible(0.0);
Submission submission2 = new Submission();
submission1.setGrade(null);
assignment1.setSubmission(submission2);
assertFalse(mAdapter.createItemCallback().areContentsTheSame(assignment1, assignment2));
}
use of com.instructure.canvasapi2.models.Assignment in project instructure-android by instructure.
the class GradesListRecyclerAdapterTest method testAreContentsTheSame_SameNameAndPoints.
@Test
public void testAreContentsTheSame_SameNameAndPoints() {
Assignment assignment = new Assignment();
assignment.setName("assignment");
assignment.setPointsPossible(0.0);
assertTrue(mAdapter.createItemCallback().areContentsTheSame(assignment, assignment));
}
use of com.instructure.canvasapi2.models.Assignment in project instructure-android by instructure.
the class GradesListRecyclerAdapterTest method testAreContentsTheSame_SameWithSubmissionNullChange.
@Test
public void testAreContentsTheSame_SameWithSubmissionNullChange() {
Assignment assignment1 = new Assignment();
assignment1.setName("assignment");
assignment1.setPointsPossible(0.0);
Submission submission1 = new Submission();
submission1.setGrade("A");
assignment1.setSubmission(submission1);
Assignment assignment2 = new Assignment();
assignment2.setName("assignment1");
assignment2.setPointsPossible(0.0);
assignment2.setSubmission(null);
assertFalse(mAdapter.createItemCallback().areContentsTheSame(assignment1, assignment2));
}
use of com.instructure.canvasapi2.models.Assignment in project instructure-android by instructure.
the class GradesListRecyclerAdapterTest method testAreContentsTheSame_DifferentScore.
@Test
public void testAreContentsTheSame_DifferentScore() {
Assignment assignment1 = new Assignment();
assignment1.setName("assignment1");
assignment1.setPointsPossible(0.0);
Assignment assignment2 = new Assignment();
assignment2.setName("assignment1");
assignment2.setPointsPossible(1.0);
assertFalse(mAdapter.createItemCallback().areContentsTheSame(assignment1, assignment2));
}
use of com.instructure.canvasapi2.models.Assignment in project instructure-android by instructure.
the class TodoListRecyclerAdapterTest method testAreContentsTheSame_DifferentTitleFromAssignment.
@Test
public void testAreContentsTheSame_DifferentTitleFromAssignment() {
ToDo item = new ToDo();
Assignment assignment = new Assignment();
assignment.setName("item");
item.setAssignment(assignment);
ToDo item1 = new ToDo();
Assignment assignment1 = new Assignment();
assignment1.setName("item1");
item1.setAssignment(assignment1);
assertFalse(mAdapter.createItemCallback().areContentsTheSame(item, item1));
}
Aggregations