[TestCase(9999, 9999, 499, false)] //min altitude under min public void ValidateTrack_SouthwestWithMaxandMinAltitude_returnsFalse(int xCor, int yCor, int alt, bool result) { var uut = new TrackValidation(); Assert.That(uut.ValidateTrack(xCor, yCor, alt), Is.EqualTo(result)); }
[TestCase(70000, 80000, 520, true)] //min altitude under min public void ValidateTrack_NortheastWithMaxandMinAltitudeInArea_returnsTrue(int xCor, int yCor, int alt, bool result) { var uut = new TrackValidation(); Assert.That(uut.ValidateTrack(xCor, yCor, alt), Is.EqualTo(result)); }
public void OnRawData(object o, RawTransponderDataEventArgs args) { _tempTrackList.Clear(); //Saves old data from _trackList into _tempTrackList _tempTrackList = _trackList.GetRange(0, _trackList.Count); _trackList.Clear(); //Adds and converts new flight(s) foreach (var track in args.TransponderData) { var td = _track.Convert(track); //Validates if it's in our area if (_trackValidation.ValidateTrack(td.X, td.Y, td.Altitude)) { //Forloop to check if the old list, _tempTrackList, holds any data about the flight for (int i = 0; i < _tempTrackList.Count; i++) { if (_tempTrackList[i].Tag.Equals(td.Tag, StringComparison.OrdinalIgnoreCase)) { //If it holds any data about the flight, calculate veocity and course _calculateVelocity.CalVelocity(_tempTrackList[i], td); _calculateCourse.CalCourse(_tempTrackList[i], td); } } //Adds flight to _trackList _trackList.Add(td); } } _trackSeperation.CheckForSeperation(_trackList); //Prints all tracks in _trackList _outputTrackReceiver.ReceiveTracks(_trackList); }
public void ValidateTrack_NortheastWithMinAltitude_returnsTrue() { var uut = new TrackValidation(); Assert.That(uut.ValidateTrack(90000, 90000, 500), Is.EqualTo(true)); }
public void ValidateTrack_NorthwestWithMinAltitude_returnsTrue() { var uut = new TrackValidation(); Assert.That(uut.ValidateTrack(10000, 90000, 500)); }