예제 #1
0
        public void ExpandLeftElbowTwoTimesTest()
        {
            //Arrange
            creator = new MockCreatorRobot();
            MockRobot robot = ((MockRobot)creator
                               .MakeARobot())
                              .WithLeftElbowCollapsed();

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

            //Assert
            result.IsSuccess.ShouldBeTrue();
            result.Success.ShouldBe(135);
            robot.LeftElbowPosition.ShouldBe(135);
        }
예제 #2
0
        public void ExpandLeftElbowAndSetWristToInitialStateTest()
        {
            //Arrange
            creator = new MockCreatorRobot();
            MockRobot robot = ((MockRobot)creator
                               .MakeARobot())
                              .WithLeftWristLimitedToLeftDirection()
                              .WithLeftElbowCollapsed();

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

            //Assert
            result.IsSuccess.ShouldBeTrue();
            result.Success.ShouldBe(90);
            robot.LeftElbowPosition.ShouldBe(90);
            robot.LeftWristDirection.ShouldBe(0);
        }