Exemplo n.º 1
0
        public void TestCounterGetDistance()
        {
            using (Counter c = new Counter())
            {
                c.DistancePerPulse = 2;

                GetCounterData()[0].Count = 5;
                Assert.AreEqual(5 * 2, c.GetDistance());

                c.DistancePerPulse = 5;
                GetCounterData()[0].Count = 258;
                Assert.AreEqual(258 * 5, c.GetDistance());
            }
        }
Exemplo n.º 2
0
        public void TestCounterGetDistance()
        {
            using (Counter c = new Counter())
            {
                c.DistancePerPulse = 2;

                HalData()["counter"][0]["count"] = 5;
                Assert.AreEqual(5 * 2, c.GetDistance());

                c.DistancePerPulse = 5;
                HalData()["counter"][0]["count"] = 258;
                Assert.AreEqual(258 * 5, c.GetDistance());
            }
        }