public override void Validate(object sender, ValidationEventArgs e)
{
if (e.Response.ContentType == expectedContentType)
{
e.Message = "The content type was correct.";
}
else
{
e.IsValid = false;
e.Message = string.Format("The content type was not correct. Expected: {0} Actual: {1}.", expectedContentType, e.Response.ContentType);
}
}
}