public void test_UpdatePlaneList_calls_airspaceWithCorrectArgs() { List <IPlane> planeList = new List <IPlane>(); IPlane plane1 = GetDummyIPlane(); // override return values plane1.XCoordinate.Returns(1); plane1.YCoordinate.Returns(2); plane1.Altitude.Returns(3); planeList.Add(plane1); uut.UpdatePlaneList(planeList); _airspace.Received(1).IsWithinArea(Arg.Is <int>(x => x == 1), Arg.Is <int>(x => x == 2), Arg.Is <int>(x => x == 3) ); }
public void TransponderDataReady_DataReceived_FlightAddedToAirspace() { var data = new List <string>() { "ATR423;39045;15932;14001;20151006213456789", "ATR555;37025;11932;14002;20151006213456789", "ATR999;34085;19320;14003;20151006213456789" }; _receiver.TransponderDataReady += Raise.EventWith(new RawTransponderDataEventArgs(data)); _airspace.Received().Add(Arg.Any <ITrack>()); }