public static IWxTableCollection GetWindCollectionStub(WindUV wind) { var s = A.Fake <IWxTableCollection>(); A.CallTo(() => s.GetWindUV(A <double> .Ignored, A <double> .Ignored, A <double> .Ignored)) .Returns(wind); return(s); }
public void ShortDistanceFlightShouldReCalculateAlt() { var wind = new WindUV(0.0, 0.0); var creator = GetCalculator( new WindCollectionStub(wind), ShortTestRoute()); var plan = creator.Create(); // If you want to edit this, make sure the nodes are manually // analyzed to make sure it's correct. var toc = plan.AllNodes[10]; Assert.AreEqual(9000.0, toc.Alt, 10.0); }
public void CreateTest() { var wind = new WindUV(0.0, 0.0); var creator = GetCalculator( new WindCollectionStub(wind), TestRoute()); var plan = creator.Create(); // If you want to edit this, make sure the nodes are manually // analyzed to make sure it's correct. var first = plan.AllNodes[0]; Assert.AreEqual(7040.0, first.FuelOnBoard, 10.0); Assert.AreEqual(62040.0, first.GrossWt, 10.0); Assert.AreEqual(42.2, first.TimeRemaining, 1.0); }
public void CalculatesWindEffectTest() { var wind = new WindUV(50.0, 50.0); var creator = GetCreator(GetWindCollectionStub(wind)); var nodes = creator.Create(); // If you want to edit this, make sure the nodes are manually // analyzed to make sure it's correct. var first = nodes[0]; Assert.AreEqual(37000.0, first.Alt, 0.1); Assert.AreEqual(5924.0, first.FuelOnBoard, 10.0); Assert.AreEqual(60924.0, first.GrossWt, 10.0); Assert.AreEqual(33.8, first.TimeRemaining, 1.0); }
public void CalculatesWindEffectTest() { var wind = new WindUV(50.0, 50.0); var initPlan = GetCreator(GetWindCollectionStub(wind)).Create(); var creator = new ClimbNodesCreator( TestAirportManager(), TestRoute(), FuelDataItemTest.GetItem(), initPlan); var nodes = creator.Create(); // If you want to edit this, make sure the nodes are manually // analyzed to make sure it's correct. var first = nodes[0]; Assert.AreEqual(6862.0, first.FuelOnBoard, 10.0); Assert.AreEqual(61862.0, first.GrossWt, 10.0); Assert.AreEqual(37.7, first.TimeRemaining, 1.0); }
public WindCollectionStub(WindUV wind) { this.wind = wind; }