コード例 #1
0
        public void StartStopSlew_Plus_SetsSlewRate()
        {
            var fakeTelescope = new FakeTelescope();
            fakeTelescope.SiderealTime = TimeSpan.FromHours(3).TotalHours;
            var controller = new DecAxisController(fakeTelescope);
            controller.Connect();

            controller.StartSlew(Orientation.Plus);

            Assert.AreEqual(8, controller.SlewRate);

            controller.StopSlew();

            Assert.AreEqual(0, controller.SlewRate);
        }
コード例 #2
0
        public void StopSlew_ThrowsIfNotStarted()
        {
            var fakeTelescope = new FakeTelescope();
            fakeTelescope.SiderealTime = TimeSpan.FromHours(3).TotalHours;
            var controller = new DecAxisController(fakeTelescope);

            controller.StopSlew();
        }
コード例 #3
0
        public void StartStopSlew_Minus_SetsSlewing()
        {
            var fakeTelescope = new FakeTelescope();
            fakeTelescope.SiderealTime = TimeSpan.FromHours(3).TotalHours;
            var controller = new DecAxisController(fakeTelescope);
            controller.Connect();

            controller.StartSlew(Orientation.Minus);

            Assert.IsTrue(controller.Slewing);

            controller.StopSlew();

            Assert.IsFalse(controller.Slewing);
        }