public static void AddDiv4ExceptionMessage(this ControlCollection controls, Exception ex, TestRule rule) { var div = new HtmlGenericControl("div") { InnerHtml = rule.ToString() + " - " + (ex is TestException ? ex.Message : ex.ToString().GetNoLongest(250).ToHtmlBold()) }; div.Style[HtmlTextWriterStyle.Color] = "red"; controls.Add(div); }
public static void AddDiv4OkMessage(this ControlCollection controls, TestRule rule) { controls.AddDiv(rule.ToString() + " - OK"); }