public void Dispose_Disposes_If_IDisposable()
        {
            var disposableTraceWriter = new DisposableTraceWriter();
            var traceWriter           = new ConditionalTraceWriter(disposableTraceWriter, t => true);

            Assert.False(disposableTraceWriter.IsDisposed);
            traceWriter.Dispose();
            Assert.True(disposableTraceWriter.IsDisposed);
        }
        public void Dispose_Ignores_IfNot_IDisposable()
        {
            var testTraceWriter = new TestTraceWriter(TraceLevel.Verbose);

            Assert.IsNotType <IDisposable>(testTraceWriter);
            var traceWriter = new ConditionalTraceWriter(testTraceWriter, t => true);

            // This shouldn't crash
            traceWriter.Dispose();
        }