Exemple #1
0
        public void TestSetup()
        {
            _trackListEvent = Substitute.For <ITrackListEvent>();
            _airspace       = FakeAirspaceGenerator.GetAirspace(0, 0, 0);

            _uutValidateTransponderData = new ValidateTransponderData(ref _trackListEvent, _airspace);
        }
Exemple #2
0
        public void IsTrackZCoordinateInAirspaceArea_IsInAirspace_returnsFalse()
        {
            _uut.Track     = FakeTrackFactory.GetTrack(200, 300, 400);
            _uut.Trackable = FakeAirspaceGenerator.GetAirspace(1000, 1000, 1000);

            var result = _uut.IsTrackZCoordinateInAirspaceArea();

            Assert.That(result.Equals(false));
        }
Exemple #3
0
        public void IsTrackYCoordinateInAirspaceArea_IsInAirspace_returnsTrue()
        {
            _uut.Track     = FakeTrackFactory.GetTrack(200, 300, 400);
            _uut.Trackable = FakeAirspaceGenerator.GetAirspace(0, 0, 0);

            var result = _uut.IsTrackYCoordinateInAirspaceArea();

            Assert.That(result);
        }
Exemple #4
0
        public void Validate_AlreadyTracked_returnsFalse()
        {
            var track  = FakeTrackFactory.GetTrackWithTag("ATR424", 234, 432, 654);
            var track2 = FakeTrackFactory.GetTrackWithTag("ATR423", 200, 300, 400);

            _uut.Trackable = FakeAirspaceGenerator.GetAirspace(0, 0, 0);


            _uut.Trackable.Trackables.Add(track);

            var result = _uut.Validate(track2, _uut.Trackable);

            Assert.That(result, Is.EqualTo(false));
        }
        public void TestSetUp()
        {
            _validationCompleteEventArgs = null;

            _trackListEvent = Substitute.For <ITrackListEvent>();

            // setup Airspace to work on
            _airspace = FakeAirspaceGenerator.GetAirspace(0, 0, 0);

            // set Validator to subscribe to Interpreter(done in constructor)
            _validateTransponderData = new ValidateTransponderData(ref _trackListEvent, _airspace);

            // setup listener
            _validateTransponderData.ValidationCompleteEventHandler += (sender, args) => { _validationCompleteEventArgs = args; };
        }
Exemple #6
0
        public void IsTrackAlreadyRegistered_AlreadyTracked_returnsFalse()
        {
            var track  = FakeTrackFactory.GetTrackWithTag("ATR424", 234, 432, 654);
            var track2 = FakeTrackFactory.GetTrackWithTag("ATR423", 200, 300, 400);

            _uut.Trackable = FakeAirspaceGenerator.GetAirspace(0, 0, 0);


            _uut.Trackable.Trackables.Add(track);
            _uut.Trackable.Trackables.Add(track2);

            var result = _uut.IsTrackAlreadyRegistered(track, track2);

            Assert.That(result.Equals(false));
        }