public async Task CalculatePercentileTest() { var test = CreateTest("Mathematics"); await _testRepository.CreateTestAsync(test, "5"); var testAttendee = CreateTestAttendee(test.Id); await _testConductRepository.RegisterTestAttendeesAsync(testAttendee); var percentile = await _reportRepository.CalculatePercentileAsync(testAttendee.Id, test.Id); Assert.Equal(testAttendee.Report.Percentile, percentile); }
public async Task <IActionResult> GetStudentPercentile([FromRoute] int attendeeId, [FromRoute] int testId) { return(Ok(await _reportRepository.CalculatePercentileAsync(attendeeId, testId))); }