Beispiel #1
0
        public void TestOverallCar()
        {
            _overallCar.Calculate();
            _overallCar.StoreResult();

            Assert.IsTrue(OverallCarOutput.LastCalculation.Direction.Equals(new Vector3(1, 0, 0), 1e-5f));
            Assert.AreEqual(10.2f, OverallCarOutput.LastCalculation.Speed);
            Assert.IsTrue(OverallCarOutput.LastCalculation.Position.Equals(new Vector3(10.2f, 0, 0), 1e-5f));
        }
 /// <summary>
 /// this function is used to call the calculation functions which are calles more than one time
 /// </summary>
 private void DoIterativeWork()
 {
     //iterate as long as the result is not exact enough
     //ToDo: Add loop for iterations
     Track.Instance.Calculate();
     Track.Instance.StoreResult();
     Suspension.Calculate();
     Suspension.StoreResult();
     Wheels.Calculate();
     Wheels.StoreResult();
     OverallCar.Calculate();
     OverallCar.StoreResult();
 }