예제 #1
0
 public string UnitSwitch(int metric)
 {
     Hrm.SwitchMetric(Hrm.PrimaryHrm);
     Hrm.PrimaryHrm.Features.Euro = metric != 1;
     //Hrm.PrimaryHrm.SetHrmData(Hrm.PrimaryHrm.Raw);
     return("Accepted");
 }
예제 #2
0
        public void SwitchUnitToMetric()
        {
            var speed     = DataHrm.Data.First().Speed;
            var distance  = DataHrm.Data.First().Distance;
            var tDistance = DataHrm.Data.First().TotalDistance;
            var altitude  = DataHrm.Data.First().Altitude;

            Hrm.SwitchMetric(DataHrm);

            var nSpeed     = DataHrm.Data.First().Speed;
            var nDistance  = DataHrm.Data.First().Distance;
            var nTDistance = DataHrm.Data.First().TotalDistance;
            var nAltitude  = DataHrm.Data.First().Altitude;

            Assert.AreNotEqual(speed, nSpeed);
            Assert.AreNotEqual(distance, nDistance);
            Assert.AreNotEqual(tDistance, nTDistance);
            Assert.AreNotEqual(altitude, nAltitude);
        }