public void ShouldInforStudentGrade() { var expectedStudentGrade = 8; _registrationRepository.Setup(r => r.GetByIdWithIncludes(_registration.Id)).Returns(_registration); _registrationConclusion.Conclude(_registration.Id, expectedStudentGrade); Assert.Equal(expectedStudentGrade, _registration.StudentGrade); }
public IActionResult Conclusion(ConclusionDto model) { try { _registrationConclusion.Conclude(model.RegistrationId, model.ExpectedGrade); } catch (DomainException exception) { return(new JsonResult(exception.ListOfRules)); } catch (Exception ex) { return(new JsonResult(ex.Message)); } return(Ok()); }