public void OnNewValidation_ValidateTracksReceived_NewInAirspace_EventHandlerInvoked()// airspace starts empty
        {
            var tracksWithTags = FakeTrackFactory.GetMultipleTracksWithTags(10);

            //This is the shared eventargs between Interpreter and Validator
            var trackListEventArgs = new TrackListEventArgs(tracksWithTags);

            // by invoke, all "subscribers" are notified - in this case it is the ValidateTransponderData
            _trackListEvent.TrackListEventHandler += Raise.EventWith(_trackListEvent, trackListEventArgs);


            CollectionAssert.AreEqual(tracksWithTags, _validationCompleteEventArgs.NewInAirspace);
        }
Exemple #2
0
        public void OnValidationComplete_Invoked()
        {
            var invoked = false;

            var trackList = FakeTrackFactory.GetMultipleTracksWithTags(1);

            _trackListEventArgs = new TrackListEventArgs(trackList);

            _uutValidateTransponderData.ValidationCompleteEventHandler += (sender, args) => invoked = true;

            _trackListEvent.TrackListEventHandler += Raise.EventWith(this, _trackListEventArgs);

            Assert.That(invoked);
        }
        public void ValidateTransponderData_EventHandlerInvoked()
        {
            var invoked        = false;
            var tracksWithTags = FakeTrackFactory.GetMultipleTracksWithTags(10);

            //This is the shared eventargs between Interpreter and Validator
            var trackListEventArgs = new TrackListEventArgs(tracksWithTags);

            _trackListEvent.TrackListEventHandler += (sender, args) => invoked = true;

            // by invoke, all "subscribers" are notified - in this case it is the ValidateTransponderData
            _trackListEvent.TrackListEventHandler += Raise.EventWith(_trackListEvent, trackListEventArgs);

            Assert.True(invoked);
        }