public void RatingQuestion_Should_ThrowNotFound() { _svc = CreateService(); _svc.Awaiting(x => x.GetRatingQuestion(INVALID_QUESTION_ID)).Should() .Throw <Exception>() .WithMessage("Question was not found with id"); }
public void AddRatingQuestion_Should_ThrowAnswerRequired() { _svc = CreateService(); _svc.Awaiting(x => x.AddRatingQuestionAnswer(new RatingQuestionAnswerData())).Should() .Throw <ValidationException>() .WithMessage("Answer must have a question"); }
public void GetLatestRatingQuestionAnswer_Should_ThrowNotFound() { _svc = CreateService(); _svc.Awaiting(x => x.GetLatestRatingQuestionAnswer(Guid.Empty)).Should() .Throw <ValidationException>() .WithMessage("Question was not found with id"); }
public void AddRatingQuestion_Should_ThrowLoadRequired() { _svc = CreateService(); var add = new RatingQuestionAnswerData() { RatingQuestionId = VALID_QUESTION_ID }; _svc.Awaiting(x => x.AddRatingQuestionAnswer(add)).Should() .Throw <ValidationException>() .WithMessage("Answer must have a load attached"); }
public void AddRatingQuestion_Should_ThrowLoadClaimRequired() { _svc = CreateService(); var add = new RatingQuestionAnswerData() { RatingQuestionId = VALID_QUESTION_ID, LoadId = Guid.NewGuid() }; _svc.Awaiting(x => x.AddRatingQuestionAnswer(add)).Should() .Throw <ValidationException>() .WithMessage("Answer must be tied to a load claim"); }