public void CheckSortInAirportByMaxLoadCapacity() { var allPlanes = new MixedAirport { Planes = planes }.GetSortedPlanesByMaxLoadCapacity(); Assert.That(allPlanes, Is.Ordered.By(nameof(Plane.MaxLoadCapacity))); }
public void CheckTransportMilitaryPlanesOnly() { MixedAirport airport = new MixedAirport { Planes = planes }; var actualTransportMilitaryPlanes = airport.GetTransportMilitaryPlanes(); var expectedPlanes = actualTransportMilitaryPlanes.Where(p => p.IsTransport()).ToList(); CollectionAssert.AreEquivalent(actualTransportMilitaryPlanes, expectedPlanes); }
public void ComparePlanesWithMaxPassengerCapacity() { MixedAirport airport = new MixedAirport { Planes = planes }; PassengerAirport passengerAirport = new PassengerAirport { Planes = airport.GetPassengersPlanes() }; PassengerPlane expectedPlaneWithMaxPassengersCapacity = passengerAirport.GetPlaneWithMaxPassengersCapacity(); Assert.That(planeWithMaxPassengerCapacity, Is.EqualTo(expectedPlaneWithMaxPassengersCapacity)); }