/// <summary> /// Constructor. /// </summary> public StudentAssignmentResultViewModel( SectionAssignmentResult assignmentResult) { LastName = assignmentResult.LastName; FirstName = assignmentResult.FirstName; Score = assignmentResult.Score; QuestionResults = assignmentResult.QuestionResults.Select ( questionResult => new StudentQuestionResultViewModel ( questionResult, getQuestionUrl: null ) ).ToList(); }
/// <summary> /// Verifies assignment group results. /// </summary> private void VerifySectionAssignmentResult( SectionAssignmentResult expected, SectionAssignmentResult actual) { Assert.Equal(expected.AssignmentGroupName, actual.AssignmentGroupName); Assert.Equal(expected.LastName, actual.LastName); Assert.Equal(expected.FirstName, actual.FirstName); Assert.Equal(expected.Score, actual.Score); Assert.Equal(expected.Status.Completion, actual.Status.Completion); Assert.Equal(expected.Status.Late, actual.Status.Late); Assert.Equal(expected.QuestionResults.Count, actual.QuestionResults.Count); for (int index = 0; index < expected.QuestionResults.Count; index++) { VerifyStudentQuestionResult ( expected.QuestionResults[index], actual.QuestionResults[index] ); } }