public void MoveHeadToBelowWhenAlignIsTopTest() { //Arrange creator = new MockCreatorRobot(); MockRobot robot = ((MockRobot)creator.MakeARobot()) .WithHeadForUp(); //Action var result = robot.MoveHeadToBelow(); //Assert result.IsSuccess.ShouldBeTrue(); result.Success.ShouldBe(Align.Normal); robot.HeadAlign.ShouldBe(Align.Normal); }
public void MoveHeadToBelowDenyTest() { //Arrange creator = new MockCreatorRobot(); MockRobot robot = ((MockRobot)creator.MakeARobot()) .WithHeadToBelow(); //Action var result = robot.MoveHeadToBelow(); //Assert result.IsFailure.ShouldBeTrue(); result.Failure.ShouldBeOfType <LimitedHeadMoveException>(); robot.HeadAlign.ShouldBe(Align.Botton); }