public void add_dividers_and_jagged_columns() { var report = new TextReport(); report.AddDivider('='); report.StartColumns(3); report.AddText("This is the header"); report.AddDivider('='); report.AddColumnData("a1***", "b1", "c1"); report.AddColumnData("a2", "b2***", "c2"); report.AddColumnData("a3", "b3", "c3***"); report.AddDivider('='); var writer = new StringWriter(); report.Write(writer); Debug.WriteLine(writer.ToString()); writer.ToString().ShouldEqualWithLineEndings(@" ========================= This is the header ========================= a1*** b1 c1 a2 b2*** c2 a3 b3 c3*** ========================= "); }
private static void writeAssemblies(StringWriter writer) { var report = new TextReport(); report.StartColumns(3); report.AddDivider('-'); report.AddText("Assemblies"); report.AddDivider('-'); AppDomain.CurrentDomain.GetAssemblies().Each(assem => { var assemblyName = assem.GetName(); var file = findCodebase(assem); report.AddColumnData(assemblyName.Name, assemblyName.Version.ToString(), file); }); report.AddDivider('-'); report.Write(writer); writer.WriteLine(); }
private static void writeProperties(StringWriter writer) { var report = new TextReport(); report.StartColumns(2); if (FubuMvcPackageFacility.Restarted.HasValue) report.AddColumnData("Restarted", FubuMvcPackageFacility.Restarted.ToString()); report.AddColumnData("Application Path", FubuMvcPackageFacility.GetApplicationPath()); report.Write(writer); writer.WriteLine(); }
public void simple_dividers_and_text_2() { var report = new TextReport(); report.AddDivider('='); report.AddText("the title of this"); report.AddDivider('='); report.AddText("some more stuff that is longer"); var writer = new StringWriter(); report.Write(writer); writer.ToString().ShouldEqualWithLineEndings(@" ============================== the title of this ============================== some more stuff that is longer "); }
private static void writeProperties(StringWriter writer, FubuRuntime runtime) { var report = new TextReport(); report.StartColumns(2); if (runtime.Restarted.HasValue) report.AddColumnData("Restarted", runtime.Restarted.ToString()); report.AddColumnData("Application Path", runtime.Files.RootPath); report.Write(writer); writer.WriteLine(); }