use of com.instructure.canvasapi.model.RubricCriterion in project instructure-android by instructure.
the class RubricCriterionUnitTest method testRubricCriterion.
@Test
public void testRubricCriterion() {
Gson gson = CanvasRestAdapter.getGSONParser();
RubricCriterion[] rubricCriterions = gson.fromJson(rubricCriterionJSON, RubricCriterion[].class);
assertNotNull(rubricCriterions);
for (RubricCriterion rubricCriterion : rubricCriterions) {
assertNotNull(rubricCriterion);
assertNotNull(rubricCriterion.getCriterionDescription());
assertNotNull(rubricCriterion.getId());
assertTrue(rubricCriterion.getPoints() >= 0);
}
}
use of com.instructure.canvasapi.model.RubricCriterion in project instructure-android by instructure.
the class RubricCriterionUnitTest method testRubricCriterionRating.
@Test
public void testRubricCriterionRating() {
Gson gson = CanvasRestAdapter.getGSONParser();
RubricCriterion[] rubricCriterions = gson.fromJson(rubricCriterionJSON, RubricCriterion[].class);
for (RubricCriterion rubricCriterion : rubricCriterions) {
if (rubricCriterion.getGradedCriterionRating() != null) {
List<RubricCriterionRating> ratings = rubricCriterion.getRatings();
for (RubricCriterionRating rubricCriterionRating : ratings) {
assertNotNull(rubricCriterionRating.getId());
assertNotNull(rubricCriterionRating.getRatingDescription());
}
}
}
}
Aggregations