public void Test_EvaluationRepository_Update_ShouldBeOk() { Evaluation evaluationToUpdate = ObjectMother.GetExistentValidEvaluation(); evaluationToUpdate = _repository.Update(evaluationToUpdate); Evaluation result = _repository.Get(evaluationToUpdate.Id); result.Should().NotBeNull(); result.Subject.Should().Be(evaluationToUpdate.Subject); }
public Evaluation Get(int id) { if (id <= 0) { throw new IdentifierUndefinedException(); } Evaluation evaluation = _evaluationRepository.Get(id); if (evaluation != null) { evaluation.Results = _resultRepository.GetByEvaluation(evaluation.Id).ToList(); } return(evaluation); }