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);
}
}
}