Пример #1
0
        public void NotAllowUnblockOwnBlockedCard_IfNoOwnBlockedCards()
        {
            var unblockCardBehaviour = new UnblockOwnCardBahaviour();
            var boardMap             = $@"  +-------------------------------+
                                +InProgress|InTesting |Completed+
                                +-------------------------------+
                                +Ivan      |          |         +
                                +          |          |         +
                                +-------------------------------+";
            var board = Create.Board.FromMap(boardMap);

            Assert.False(unblockCardBehaviour.CanApply("Ivan", board, CoinSide.Tails));
        }
Пример #2
0
        public void UnblockOwnBlockedCard_IfOwnCardBlocked()
        {
            var unblockCardBehaviour = new UnblockOwnCardBahaviour();
            var boardMap             = $@"  +-------------------------------+
                                +InProgress|InTesting |Completed+
                                +-------------------------------+
                                +Ivan*     |          |         +
                                +          |          |         +
                                +-------------------------------+";
            var board = Create.Board.FromMap(boardMap);

            var newBoard = unblockCardBehaviour.Apply("Ivan", board, CoinSide.Tails);

            Assert.True(unblockCardBehaviour.CanApply("Ivan", board, CoinSide.Tails));
            AssertBoard.Equals($@"+-------------------------------+
                                  +InProgress|InTesting |Completed+
                                  +-------------------------------+
                                  +Ivan      |          |         +
                                  +          |          |         +
                                  +-------------------------------+", newBoard);
        }