Exemple #1
0
        public void ExpandRightElbowTest()
        {
            //Arrange
            creator = new MockCreatorRobot();
            MockRobot robot = ((MockRobot)creator
                               .MakeARobot())
                              .WithRightElbowCollapsed();

            //Action
            var result = robot.RightElbowExpand();

            //Assert
            result.IsSuccess.ShouldBeTrue();
            result.Success.ShouldBe(90);
            robot.RightElbowPosition.ShouldBe(90);
        }
Exemple #2
0
        public void ExpandRightElbowAndSetWristToInitialStateTest()
        {
            //Arrange
            creator = new MockCreatorRobot();
            MockRobot robot = ((MockRobot)creator
                               .MakeARobot())
                              .WithRightWristLimitedToLeftDirection()
                              .WithRightElbowCollapsed();

            //Action
            var result = robot.RightElbowExpand();

            //Assert
            result.IsSuccess.ShouldBeTrue();
            result.Success.ShouldBe(90);
            robot.RightElbowPosition.ShouldBe(90);
            robot.RightWristDirection.ShouldBe(0);
        }