public void ShowAllFlights_ListOfTracksContainsOneElement_ConsoleLogInformationCalled()
        {
            var tracks = new List <ITrack>()
            {
                TrackFactory.CreateTestTrack()
            };

            _uut.ShowAllFlightsInAirspace(tracks);

            _console.Received(1).LogInformation(Arg.Any <string>());
        }
        public void ShowSeparationCondition_ListOfTracksContainsOneElement_ConsoleLogInformationNotCalled()
        {
            var tracks = new List <ITrack>()
            {
                TrackFactory.CreateTestTrack()
            };

            _uut.ShowSeparationCondition(tracks);

            _console.DidNotReceive().LogInformation(Arg.Any <string>());
        }
        public void ShowSeparationCondition_ListOfTracksContainsTwoElements_ConsoleLogErrorNotCalled()
        {
            var tracks = new List <ITrack>()
            {
                TrackFactory.CreateTestTrack(),
                TrackFactory.CreateTestTrack(),
            };

            _uut.ShowSeparationCondition(tracks);

            _console.DidNotReceive().LogError(Arg.Any <string>());
        }
        public void ShowAllFlights_ListOfTracksContainsTenElements_ConsoleLogInformationCalled()
        {
            var tracks = new List <ITrack>();

            for (var i = 0; i < 10; i++)
            {
                tracks.Add(TrackFactory.CreateTestTrack());
            }

            _uut.ShowAllFlightsInAirspace(tracks);

            _console.Received(10).LogInformation(Arg.Any <string>());
        }
        public void ShowSeparationCondition_ListOfTracksContainsTenElements_ConsoleLogInformationNotCalled()
        {
            var tracks = new List <ITrack>();

            for (var i = 0; i < 10; i++)
            {
                tracks.Add(TrackFactory.CreateTestTrack());
            }

            _uut.ShowSeparationCondition(tracks);

            _console.DidNotReceive().LogInformation(Arg.Any <string>());
        }
        public void HandleSeparationWarningEvent_SeparationOccured_ListOfFlightsReceived()
        {
            var flightTracks = new List <ITrack>()
            {
                TrackFactory.CreateTestTrack(),
                TrackFactory.CreateTestTrack()
            };

            _separation.SeparationWarningEvent += Raise.EventWith(new SeparationWarningEventArg()
            {
                SeparationList = flightTracks
            });

            Assert.That(_separationWarningEventArg.SeparationList, Is.EqualTo(flightTracks));
        }
        public void HandleSeparationWarningEvent_SeparationOccured_EventIsHandled()
        {
            var flightTracks = new List <ITrack>()
            {
                TrackFactory.CreateTestTrack(),
                TrackFactory.CreateTestTrack()
            };

            _separation.SeparationWarningEvent += Raise.EventWith(new SeparationWarningEventArg()
            {
                SeparationList = flightTracks
            });

            Assert.That(_eventHandled, Is.True);
        }
        public void HandleFlightAddedEvent_FlightsReceived_ListOfFlightReceived()
        {
            var flightTracks = new List <ITrack>()
            {
                TrackFactory.CreateTestTrack(),
                TrackFactory.CreateTestTrack()
            };

            _airspace.FlightAddedEvent += Raise.EventWith(new FlightAddedEventArg()
            {
                Tracks = flightTracks
            });

            Assert.That(_flightAddedEventArg.Tracks, Is.EqualTo(flightTracks));
        }
        public void HandleFlightAddedEvent_FlightsReceived_EventIsHandled()
        {
            var flightTracks = new List <ITrack>()
            {
                TrackFactory.CreateTestTrack(),
                TrackFactory.CreateTestTrack()
            };

            _airspace.FlightAddedEvent += Raise.EventWith(new FlightAddedEventArg()
            {
                Tracks = flightTracks
            });

            Assert.That(_eventHandled, Is.True);
        }