Example #1
0
        internal void StatusHandler(ColonyStatusMessage message)
        {
            var changedMessage = new StatusChangedMessage
                                 {
                                     Text = message.Text
                                 };

            m_Bus.PublishAsync(changedMessage);
        }
        public void ColonyStatusHandler_SendsMessage_WhenCalled()
        {
            // Arrange
            const string expected = "Text";
            var message = new ColonyStatusMessage
                          {
                              Text = expected
                          };

            // Act
            m_Sut.StatusHandler(message);

            // Assert
            m_Bus.Received().PublishAsync(Arg.Is <StatusChangedMessage>(x => x.Text == expected));
        }