public async Task GivenMessage_WhenDispose_ShouldDisposeConnection()
        {
            await GivenMessage_WhenPublish_ShouldReturn();

            _publisher.Dispose();

            _connectionMock.Verify(x => x.Dispose(), Times.Once());
        }
示例#2
0
        private void Dispose(bool disposing)
        {
            if (!_disposed && disposing)
            {
                _publisher.Dispose();
            }

            _disposed = true;
        }