public void Inner_Stream_Calls_Dispose(bool disposeStream) { string key = "test"; var mockStream = new Mock <Stream>(); var mockProgress = new Mock <IProgress <IWriteProgress> >(); var progressStream = new ProgressStream(key, mockStream.Object, null, mockProgress.Object, disposeStream); progressStream.Dispose(); }
public static void TestDoubleDispose() { using (Stream stream = Stream.Null) { Assert.DoesNotThrow(() => { using (ProgressStream progressStream = new ProgressStream(stream, new ProgressContext())) { progressStream.Dispose(); } }); } }