Amido.Testing.WebApi.ValidationRules.AssertBodyDoesNotIncludeValueValidationRule.Validate C# (CSharp) Method

Validate() public method

The validate method.
public Validate ( object sender, ValidationEventArgs e ) : void
sender object The sender.
e ValidationEventArgs The
return void
        public override void Validate(object sender, ValidationEventArgs e)
        {
            if (e.Response.BodyString.IndexOf(value, System.StringComparison.Ordinal) == -1)
            {
                e.Message = "The body correctly does not include the value.";
            }
            else
            {
                e.IsValid = false;
                e.Message = string.Format("The body includes the value: {0} in the body: {1}", value, e.Response.BodyString);
            }
        }
    }
AssertBodyDoesNotIncludeValueValidationRule