public void T07_SinglePlaneCannotLandOnNullRunway() { // Given Plane plane = PlaneFactory.Create(location: PlaneLocation.InAir); Runway runway = null; // When LandingStatus result = plane.TryLandOn(runway); // Then Assert.IsTrue(runway == null); Assert.IsTrue(result == LandingStatus.Failure); Assert.IsTrue(plane.Location == PlaneLocation.InAir); }
public void T04_SinglePlaneCanLandOnSingleEmptyRunway() { // Given Plane plane = PlaneFactory.Create(location: PlaneLocation.InAir); Runway runway = new Runway("runway 01", RunwayStatus.Empty); // When LandingStatus result = plane.TryLandOn(runway); // Then Assert.IsTrue(result == LandingStatus.Success); Assert.IsTrue(plane.Location == PlaneLocation.OnRunway); Assert.IsTrue(runway.Status == RunwayStatus.Full); }