public void AddGrade_Exception() { GradesService service = new GradesService(); GradeModel expected = new GradeModel() { Id = 6, StudentId = 1, LectionId = 2, Grade = 8, Date = DateTime.Now }; Assert.Throws <InvalidGradeException>(() => service.AddGrade(expected)); }
public void Post([FromBody] GradeModel value) { _grades.AddGrade(value); }