public void When_Posting_Via_A_Control_Bus_Sender() { _controlBusSender.Post(_myCommand); //_should_store_the_message_in_the_sent_command_message_repository _fakeMessageStore.MessageWasAdded.Should().BeTrue(); //_should_send_a_message_via_the_messaging_gateway _fakeMessageProducer.MessageWasSent.Should().BeTrue(); //_should_convert_the_command_into_a_message _fakeMessageStore.Get().First().Should().Be(_message); }
public void When_Posting_Via_A_Control_Bus_Sender() { _controlBusSender.Post(_myCommand); //_should_store_the_message_in_the_sent_command_message_repository Assert.True(_fakeMessageStore.MessageWasAdded); //_should_send_a_message_via_the_messaging_gateway Assert.True(_fakeMessageProducer.MessageWasSent); //_should_convert_the_command_into_a_message Assert.AreEqual(_message, _fakeMessageStore.Get().First()); }
public void When_Posting_Via_A_Control_Bus_Sender() { _controlBusSender.Post(_myCommand); //_should_store_the_message_in_the_sent_command_message_repository var message = _fakeOutbox .DispatchedMessages(120000, 1) .SingleOrDefault(); message.Should().NotBe(null); //_should_convert_the_command_into_a_message message.Should().Be(_message); }