Ejemplo n.º 1
0
        public void CaulculateTimeForTrip_CorrectDistanceTest()
        {
            Drone       drone         = new Drone(new Coordinates(0, 0, 5));
            Coordinates newPosition   = new Coordinates(200, 0, 5);
            double      expected      = 18.333333;
            double      actual        = drone.CaulculateTimeForTrip(newPosition);
            double      roundingError = 0.000001; //0,0036 seconds

            Assert.IsTrue(Math.Abs(expected - actual) < roundingError);
        }