use of com.instructure.canvasapi.model.MasteryPathAssignment in project instructure-android by instructure.
the class MasteryPathAssignmentUnitTest method testMasteryPathAssignment.
@Test
public void testMasteryPathAssignment() {
Gson gson = CanvasRestAdapter.getGSONParser();
MasteryPathAssignment[] masteryPathAssignments = gson.fromJson(masteryPathAssignmentJSON, MasteryPathAssignment[].class);
assertNotNull(masteryPathAssignments);
assertTrue(masteryPathAssignments.length > 0);
assertNotNull(masteryPathAssignments[0].getAssignment());
// check the assignment
Assignment assignment = masteryPathAssignments[0].getAssignment();
assertTrue(assignment.getId() == 5);
assertTrue(assignment.getPointsPossible() == 0);
assertNotNull(assignment.getSubmissionTypes());
}
Aggregations