Пример #1
0
        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());
        }
Пример #2
0
        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");
        }
Пример #3
0
        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");
        }