public void NotAllowsMoveAnotherPlayerUnblockedCard_IfCardBlocked() { var moveAnotherPlayerCardForwardBehaviour = new MoveAnotherPlayerCardForwardBehaviour(); var boardMap = $@" +-------------------------------+ +InProgress|InTesting |Completed+ +-------------------------------+ +Ivan* | | + + | | + +-------------------------------+"; var board = Create.Board.FromMap(boardMap); Assert.False(moveAnotherPlayerCardForwardBehaviour.CanApply("Ivan", board, CoinSide.Tails)); }
public void AllowsMoveAnotherPlayerUnblockedCard_IfDropTailsAndWipLimitNotExceed() { var moveAnotherPlayerCardForwardBehaviour = new MoveAnotherPlayerCardForwardBehaviour(); var wipLimit = Create.WipLimit.WithLimit(1).Build(); var boardMap = $@" +-------------------------------+ +InProgress|InTesting |Completed+ +-------------------------------+ +Vova | | + + | | + +-------------------------------+"; var board = Create.Board.FromMap(boardMap); Assert.True(moveAnotherPlayerCardForwardBehaviour.CanApply("Ivan", board, CoinSide.Tails)); }
public void NotAllowsMoveAnotherPlayerUnblockedCard_IfDropTailsAndWipLimitExceed() { var moveAnotherPlayerCardForwardBehaviour = new MoveAnotherPlayerCardForwardBehaviour(); var boardMap = $@" +-------------------------------+ +InProgress|InTesting |Completed+ +-------------------------------+ +Vova |Ivan | + + | | + #-------------------------------# +Limit:1 |Limit:1 | +"; var board = Create.Board.FromMap(boardMap); Assert.False(moveAnotherPlayerCardForwardBehaviour.CanApply("Ivan", board, CoinSide.Tails)); }
public void MoveAnotherPlayerUnblockedCard_IfCardUnblocked() { var moveAnotherPlayerCardForwardBehaviour = new MoveAnotherPlayerCardForwardBehaviour(); var boardMap = $@" +-------------------------------+ +InProgress|InTesting |Completed+ +-------------------------------+ +Vova | | + + | | + +-------------------------------+"; var board = Create.Board.FromMap(boardMap); var newBoard = moveAnotherPlayerCardForwardBehaviour.Apply("Ivan", board, CoinSide.Tails); Assert.True(moveAnotherPlayerCardForwardBehaviour.CanApply("Ivan", board, CoinSide.Tails)); AssertBoard.Equals($@"+-------------------------------+ +InProgress|InTesting |Completed+ +-------------------------------+ + |Vova | + + | | + +-------------------------------+", newBoard); }