Beispiel #1
0
        public void ResetShouldDoAllChannelsFreeAndAllNodesUnactive()
        {
            // Arrange
            _network.AddNode(_node1);
            _network.AddNode(_node2);
            _network.AddChannel(_channel);

            _node1.IsActive = true;
            _channel.IsBusy = true;

            // Act
            _network.Reset();

            // Assert
            Assert.IsTrue(_network.Nodes.All(n => !n.IsTableUpdated));
            Assert.IsTrue(_network.Channels.All(n => !n.IsBusy));
        }
Beispiel #2
0
        private void Start_OnClick(object sender, RoutedEventArgs e)
        {
            _headerUpdater?.Stop();

            _headerUpdater = null;

            _backgroundWorker?.Stop();

            _backgroundWorker = null;

            _network.ClearMessages();
            _network.Reset();

            var simulationOptionsDialog = new SimulationOptionsDialog(InitializeAllServices);

            simulationOptionsDialog.Show();
        }