Пример #1
0
        public void When_repositing_message()
        {
            _repostHandler.Handle(_command);

            //should_send_message_to_broker
            Assert.True(_fakeMessageProducer.MessageWasSent);
        }
        public void When_reposting_messages_and_store_not_found()
        {
            _ex = Catch.Exception(() => _repostHandler.Handle(_command));

            //should_throw_expected_exception
            _ex.Should().BeOfType <Exception>();
            _ex.Message.Should().Contain("Store");
        }
Пример #3
0
        public void When_reposting_messages_and_store_not_found()
        {
            _ex = Catch.Exception(() => _repostHandler.Handle(_command));

            //should_throw_expected_exception
            Assert.IsInstanceOf <Exception>(_ex);
            StringAssert.Contains("Store", _ex.Message);
        }
        public void When_reposting_message_broker_cannot_be_created()
        {
            var ex = Catch.Exception(() => _repostHandler.Handle(_command));

            //should_throw_expected_exception
            Assert.IsInstanceOf <Exception>(ex);
            StringAssert.Contains("Mis-configured", ex.Message);
        }
        public void When_reposting_message_broker_cannot_be_created()
        {
            var ex = Catch.Exception(() => _repostHandler.Handle(_command));

            //should_throw_expected_exception
            ex.Should().BeOfType <Exception>();
            ex.Message.Should().Contain("Mis-configured");
        }
Пример #6
0
        public void When_reposting_messages_one_fails()
        {
            _ex = Catch.Exception(() => _repostHandler.Handle(_command));

            //should_throw_expected_exception
            Assert.IsInstanceOf <Exception>(_ex);
            StringAssert.Contains("messages", _ex.Message);
            StringAssert.Contains(_messageToRepostMissing.Id.ToString(), _ex.Message);
        }
Пример #7
0
        public void When_reposting_messages_one_fails()
        {
            _ex = Catch.Exception(() => _repostHandler.Handle(_command));

            //should_throw_expected_exception
            _ex.Should().BeOfType <Exception>();
            _ex.Message.Should().Contain("messages");
            _ex.Message.Should().Contain(_messageToRepostMissing.Id.ToString());
        }