示例#1
0
        public void IsVelocityCorrect(int x1, int x2, int y1, int y2, string timestamp1, string timestamp2, int result)
        {
            trackobject1.XCoord = x1;
            trackobject1.YCoord = y1;
            trackobject2.XCoord = x2;
            trackobject2.YCoord = y2;

            trackobject1.Timestamp = DateTime.ParseExact(timestamp1, "yyyyMMddHHmmssfff",
                                                         System.Globalization.CultureInfo.InvariantCulture);
            trackobject2.Timestamp = DateTime.ParseExact(timestamp2, "yyyyMMddHHmmssfff",
                                                         System.Globalization.CultureInfo.InvariantCulture);

            Assert.That(_uut.CalculateVelocity(trackobject1, trackobject2), Is.EqualTo(result));
        }
示例#2
0
        public void ATMSystemUsesVelocityCourseCalculator_IsVelocityCorrect()
        {
            int temp = _velocityCourseCalculator.CalculateVelocity(trackObject1, trackObject2);

            Assert.AreEqual(141, temp);
        }
 public void CalculateVelocityUsesDistance()
 {
     Assert.AreEqual(141, _uut.CalculateVelocity(trackObject1, trackObject2));
 }