Пример #1
0
        public void WhenSubscribindToEventAndConnectedToRabbitShouldNotConnect()
        {
            _rabbitMqPersistentConnection.IsConnected.Returns(true);
            _sut.Subscribe <Event>();

            _rabbitMqPersistentConnection.DidNotReceive().TryConnect();
        }
Пример #2
0
        public async Task WhenInitializingConsumerChannelShouldNotTryConnectIfAlreadyConnectedToRabbit()
        {
            _rabbitMqPersistentConnection.IsConnected.Returns(true);
            await _sut.InitializeConsumersChannelsAsync();

            _rabbitMqPersistentConnection.DidNotReceive().TryConnect();
        }