public void SetUp() { theLog = new ModelBindingLog() { Report = new BindingReport(typeof(FakeModel), new FakeModelBinder()) }; }
public HtmlTag VisualizePartial(ModelBindingLog log) { var title = "Model Binding for " + log.Report.ModelType.FullName; var collapsible = new CollapsibleTag(log.Id.ToString(), title); var description = Description.For(log.Report.Binder); collapsible.AppendContent(new HtmlTag("div").AddClass("model-binder-title").Text("Used " + description.Title)); if (log.Report.OrderedProperties().Any()) { var report = new ModelBindingHtmlReport(); log.Report.AcceptVisitor(report); collapsible.AppendContent(report.Table); } else { var tag = new DescriptionBodyTag(description); collapsible.AppendContent(tag); } return(collapsible); }