public void HandleNewData(FormattedData currentData)
        {
            if (_seperationCalculator.IsAircraftInAirspace(currentData) == true)
            {
                foreach (FormattedData aircraft in _seperationCalculator.GetAircraftList())
                {
                    if (currentData.Tag == aircraft.Tag)
                    {
                        oldData = aircraft;
                    }
                }

                currentData.Speed         = _speedCalculator.CalculateSpeed(currentData, oldData);
                currentData.CompassCourse = _positionCalculator.CalculatePosition(currentData);
                _seperationCalculator.Remove(oldData);
                _seperationCalculator.Add(currentData);


                if (_seperationCalculator.IsThereConflict(currentData) == true)
                {
                    IsThereConflicts = true;

                    _render = new RenderWithSeperation(_clear);
                    _render.PrintData(_seperationCalculator.GetAircraftList(),
                                      _seperationCalculator.GetConflicts());
                }
                else
                {
                    IsThereConflicts = false;

                    _render = new RenderData(_clear);
                    _render.PrintData(_seperationCalculator.GetAircraftList(),
                                      _seperationCalculator.GetConflicts());
                }
            }
            else
            {
                _seperationCalculator.Add(currentData);
                _seperationCalculator.IsThereConflict(currentData);

                if (_seperationCalculator.IsThereConflict(currentData) == true)
                {
                    IsThereConflicts = true;
                    _render          = new RenderWithSeperation(_clear);
                    _render.PrintData(_seperationCalculator.GetAircraftList(), _seperationCalculator.GetConflicts());
                }
                else
                {
                    IsThereConflicts = false;
                    _render          = new RenderData(_clear);
                    _render.PrintData(_seperationCalculator.GetAircraftList(), _seperationCalculator.GetConflicts());
                }
            }
        }
        public void AreAircraftsInConflict_InputThroughList_ExpectedTrue()
        {
            FormattedData test1 = new FormattedData("Test1", 20000, 20000, 2000, DateTime.Today, "Nord", 0);

            _uut.Add(test1);

            FormattedData test2 = new FormattedData("Test2", 16000, 16000, 1800, DateTime.Today, "Nord", 0);

            _uut.Add(test2);

            Assert.That(_uut.IsThereConflict(test1) == true);
        }
        public void TestReception_InputThroughTransponderAirplaneInConflict_ExpectedTrue()
        {
            DateTime      date  = new DateTime(2015, 10, 06, 21, 34, 56, 789);
            FormattedData value = new FormattedData("PPL120", 29045, 22932, 24000, date, "", 0);

            _formatter.FormattedDataReady
                += Raise.EventWith(this, new FormattedDataEventArgs(value));

            DateTime      date2  = new DateTime(2015, 10, 06, 21, 34, 56, 780);
            FormattedData value2 = new FormattedData("ATR423", 39045, 12932, 14000, date2, "", 0);

            _formatter.FormattedDataReady
                += Raise.EventWith(this, new FormattedDataEventArgs(value2));

            DateTime      date3  = new DateTime(2015, 10, 06, 21, 39, 02, 999);
            FormattedData value3 = new FormattedData("QUR421", 35045, 12932, 14200, date3, "", 0);

            Assert.That(_seperationCalculator.IsThereConflict(value3) == true);
        }