示例#1
0
        public void WhenSubscribingToEventAndNotConnectedToRabbitShouldConnect()
        {
            _rabbitMqPersistentConnection.IsConnected.Returns(false);
            _sut.Subscribe <Event>();

            _rabbitMqPersistentConnection.Received(1).TryConnect();
        }
示例#2
0
        public async Task WhenInitializingConsumerChannelShouldTryConnectIfNotConnectedToRabbit()
        {
            _rabbitMqPersistentConnection.IsConnected.Returns(false);
            await _sut.InitializeConsumersChannelsAsync();

            _rabbitMqPersistentConnection.Received(1).TryConnect();
        }