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