private void TimerOnElapsed(object sender, EventArgs e) { _locker.WaitOne(); Ticks++; if (Ticks % _updatePeriod == 0) { _messageCreator.UpdateTables(); } _messageGenerator?.Generate(); _messageExchanger?.HandleMessagesOnce(); _messageRegistrator?.RegisterMessages(); _networkDrawer?.UpdateComponents(); _messageViewUpdated.Show(); _locker.ReleaseMutex(); }
public void HandleMessagesOnceShouldReplaceMessageToChannelInFirstMessageSlot() { // Arrange var firstNode = _nodes.First(); firstNode.MessageQueueHandlers .First().AppendMessage(_message); var firstChannel = _channels.First(); // Act _messageExchanger.HandleMessagesOnce(); // Assert Assert.IsNotNull(firstChannel.FirstMessage); Assert.IsNull(firstChannel.SecondMessage); }