public void RotateLeftWristToTheLeftDenyBecauseElbowIsntCollapsedTest() { //Arrange creator = new MockCreatorRobot(); MockRobot robot = ((MockRobot)creator.MakeARobot()); //Action var result = robot.LeftWristRotateToTheLeft(); //Assert result.IsFailure.ShouldBeTrue(); result.Failure.ShouldBeOfType <DeniedWristRotateException>(); robot.LeftWristDirection.ShouldBe(0); }
public void RotateLeftWristToTheLeftTest() { //Arrange creator = new MockCreatorRobot(); MockRobot robot = ((MockRobot)creator .MakeARobot()) .WithLeftElbowCollapsed(); //Action var result = robot.LeftWristRotateToTheLeft(); //Assert result.IsSuccess.ShouldBeTrue(); result.Success.ShouldBe(45); robot.LeftWristDirection.ShouldBe(45); }
public void RotateLeftWristToTheLeftDenyBecauseItIsLimitedTest() { //Arrange creator = new MockCreatorRobot(); MockRobot robot = ((MockRobot)creator .MakeARobot()) .WithLeftElbowCollapsed() .WithLeftWristLimitedToLeftDirection(); //Action var result = robot.LeftWristRotateToTheLeft(); //Assert result.IsFailure.ShouldBeTrue(); result.Failure.ShouldBeOfType <LimitedWristRotateException>(); robot.LeftWristDirection.ShouldBe(180); }