Inheritance: System.IO.TextWriter
コード例 #1
0
ファイル: TextLoggerFixture.cs プロジェクト: eslahi/prism
        public void ShouldDisposeWriterOnDispose()
        {
            MockWriter writer = new MockWriter();
            IDisposable logger = new TextLogger(writer);

            Assert.IsFalse(writer.DisposeCalled);
            logger.Dispose();
            Assert.IsTrue(writer.DisposeCalled);
        }
コード例 #2
0
        public void ShouldDisposeWriterOnDispose()
        {
            MockWriter  writer = new MockWriter();
            IDisposable logger = new TextLogger(writer);

            Assert.IsFalse(writer.DisposeCalled);
            logger.Dispose();
            Assert.IsTrue(writer.DisposeCalled);
        }