public void OversightOutcomeValidator_returns_error_when_status_is_empty(OversightReviewStatus oversightStatus, string approveGateway, string approveModeration, bool errorsExpected)
        {
            var request = new OutcomePostRequest
            {
                OversightStatus   = oversightStatus,
                ApproveGateway    = approveGateway,
                ApproveModeration = approveModeration,
                UnsuccessfulText  = oversightStatus == OversightReviewStatus.Unsuccessful ? "comments" : null
            };

            var result = _validator.Validate(request, options => options.IncludeRuleSets(OutcomePostRequestValidator.RuleSets.Default));

            Assert.AreEqual(errorsExpected, !result.IsValid);
        }
Example #2
0
        public void OversightOutcomeValidator_returns_success_when_request_is_valid()
        {
            var result = _validator.Validate(_request, options => options.IncludeRuleSets(OutcomePostRequestValidator.RuleSets.AppealOutcome));

            Assert.IsTrue(result.IsValid);
        }