public void CheckDisposed_ControlDisposed_ObjectDisposedException() { var stubbedWindow = new StubbedWindow(); var sut = new StubbedConsoleControl(stubbedWindow); sut.DisposeInternal(false); stubbedWindow.KeyEventEvent.Should().NotBeNull(); stubbedWindow.MouseEventEvent.Should().NotBeNull(); sut.Dispose(); sut.Invoking(c => c.DoCheckDisposed()) .Should().Throw <ObjectDisposedException>() .Which .ObjectName .Should().Be(nameof(StubbedConsoleControl)); }