public void Dispose_should_raise_the_correct_events()
        {
            _subject.Dispose();

            _listener.ReceivedWithAnyArgs().ConnectionBeforeClosing(default(ConnectionBeforeClosingEvent));
            _listener.ReceivedWithAnyArgs().ConnectionAfterClosing(default(ConnectionAfterClosingEvent));
        }
Example #2
0
        public void Dispose_should_raise_the_correct_events()
        {
            _subject.Dispose();

            _capturedEvents.Next().Should().BeOfType <ConnectionClosingEvent>();
            _capturedEvents.Next().Should().BeOfType <ConnectionClosedEvent>();
            _capturedEvents.Any().Should().BeFalse();
        }