public async Task GivenMessage_WhenDispose_ShouldDisposeConnection() { await GivenMessage_WhenPublish_ShouldReturn(); _publisher.Dispose(); _connectionMock.Verify(x => x.Dispose(), Times.Once()); }
private void Dispose(bool disposing) { if (!_disposed && disposing) { _publisher.Dispose(); } _disposed = true; }