public void Move_SendValidRequest()
        {
            //Arrange
            string       commandName            = "move";
            string       positionParameterName  = "Position";
            double       positionParameterValue = 2;
            IRestRequest sentRequest            = null;
            var          commandSenderMock      = new Mock <ICommandSender>();

            commandSenderMock
            .Setup(x => x.ExecuteRequest <CommandResponse>(It.IsAny <string>(), It.IsAny <RestRequest>()))
            .Callback((string baseUrl, IRestRequest request) => sentRequest = request)
            .Returns(new CommandResponse());
            var rotator = new Rotator(_deviceConfiguration, commandSenderMock.Object);

            //Act
            rotator.Move(positionParameterValue);

            //Assert
            Assert.Equal(Method.PUT, sentRequest.Method);
            AssertCommonParameters(sentRequest.Parameters, _deviceConfiguration, commandName);
            AssertParameter(sentRequest.Parameters, positionParameterName, positionParameterValue);
        }
        static void Main(string[] args)
        {
            var progId = Rotator.Choose(string.Empty);
            var driver = new Rotator(progId);
            driver.Connected = true;
            Console.WriteLine("Connected to Rotator Driver");

            driver.Move(5);
            while (driver.IsMoving)
            {
                Console.WriteLine("Moving...");
            }
            Console.WriteLine("Moved 5 degrees Relative");

            //driver.Move(5);
            //while (driver.IsMoving)
            //{
            //    Console.WriteLine("Moving...");
            //}
            //Console.WriteLine("Moved 5 degrees relative");

            //driver.Move(5);
            //while (driver.IsMoving)
            //{
            //    Console.WriteLine("Moving...");
            //}
            //Console.WriteLine("Moved 5 degrees Relative");

            //Console.WriteLine("Moving to Absolute Pos 5");
            //while (driver.IsMoving)
            //{
            //    Console.WriteLine("Moving...");
            //}

            Console.WriteLine("Moving to Absolute Pos 5");
            driver.MoveAbsolute(5.9F);
            while (driver.IsMoving)
            {
                Console.WriteLine("Moving... Current Position = " + driver.Position.ToString());
                Console.WriteLine("Moving... Target Position = " + driver.TargetPosition.ToString());
            }

            Console.WriteLine("Moving to Absolute Pos 15");
            driver.MoveAbsolute(75.125F);
            while (driver.IsMoving)
            {
                Console.WriteLine("Moving... Current Position = " + driver.Position.ToString() );
                Console.WriteLine("Moving... Target Position = " + driver.TargetPosition.ToString());
            }
            Console.WriteLine("Finished Move! Current Position = " + driver.Position.ToString());

            Console.WriteLine("Moving to Absolute Pos 5");
            driver.MoveAbsolute(5.9F);
            while (driver.IsMoving)
            {
                Console.WriteLine("Moving... Current Position = " + driver.Position.ToString());
                Console.WriteLine("Moving... Target Position = " + driver.TargetPosition.ToString());
            }

            Console.WriteLine("Moving... Current Position = " + driver.Position.ToString());
            Console.WriteLine("Moving... Target Position = " + driver.TargetPosition.ToString());

            driver.Connected = false;
            Console.WriteLine("Disconnected to Rotator Driver");

            Console.ReadLine();
        }