public static void WriteIntrospectionToFile(this IServiceBus bus, string fileName) { IDiagnosticsProbe probe = bus.Probe(); var fs = new DotNetFileSystem(); fs.DeleteFile(fileName); fs.Write(fileName, probe.ToString()); }
public void File_contents_should_be_the_same() { Assert.AreEqual(fs.ReadToEnd(@".\temp.txt"), "hi123"); fs.Write(@".\temp.txt", "hii"); Assert.AreEqual(fs.ReadToEnd(@".\temp.txt"), "hii"); fs.DeleteFile(@".\temp.txt"); }
public void Overwrite_Files() { var conv = new DefaultNuConventions(); var fs = new DotNetFileSystem(conv); fs.Write(@".\temp.txt", "hi123"); Assert.AreEqual(fs.ReadToEnd(@".\temp.txt"), "hi123"); fs.Write(@".\temp.txt", "hii"); Assert.AreEqual(fs.ReadToEnd(@".\temp.txt"), "hii"); fs.DeleteFile(@".\temp.txt"); }