Amido.Testing.WebApi.ValidationRules.AssertContentLengthEqualsValidationRule.Validate C# (CSharp) Метод

Validate() публичный Метод

The validate method.
public Validate ( object sender, ValidationEventArgs e ) : void
sender object The sender.
e ValidationEventArgs The
Результат void
        public override void Validate(object sender, ValidationEventArgs e)
        {
            if (e.Response.ContentLength == expectedContentLength)
            {
                e.Message = "The content length was correct.";
            }
            else
            {
                e.IsValid = false;
                e.Message = string.Format("The content length was not correct. Expected: {0} Actual: {1}.", expectedContentLength, e.Response.ContentLength);
            }
        }
    }
AssertContentLengthEqualsValidationRule