internal void AntSettingsModelSetHandler(AntSettingsModelSetMessage message) { var forward = new ColonyAntSettingsSetMessage { IsFixedStartNode = message.IsFixedStartNode, FixedStartNode = message.FixedStartNode }; m_InMemoryBus.PublishAsync(forward); }
public void AntSettingsModelSetHandler_SendsMessage_WhenCalled() { // Arrange var message = new AntSettingsModelSetMessage { IsFixedStartNode = true, FixedStartNode = 123 }; // Act m_Sut.AntSettingsModelSetHandler(message); // Assert m_Bus.Received() .PublishAsync(Arg.Is <ColonyAntSettingsSetMessage>(x => x.IsFixedStartNode == message.IsFixedStartNode && x.FixedStartNode == message.FixedStartNode)); }
internal void Apply() { IsApplying = true; int fixedStartNode = m_SelectedNode != null ? m_SelectedNode.Id : 0; var message = new AntSettingsModelSetMessage { IsFixedStartNode = IsFixedStartNode, FixedStartNode = fixedStartNode }; m_Bus.PublishAsync(message); NotifyPropertyChanged("IsApplyEnabled"); }