コード例 #1
0
        public void MoveTwoRowstColumnThreeToColumnOne_NotValid()
        {
            //Arrange
            var canMove       = new CanMove_ColumnOneSpace();
            var firstTile     = IslandTileAtRowThreeColumnThree();
            var secondTile    = IslandTileAtRowThreeColumnOne();
            var currentPlayer = new Player();

            //Act
            var validation = canMove.IsValid(firstTile, secondTile, currentPlayer);

            //Assert
            Assert.AreEqual(validation.IsValid, false);
            Assert.AreEqual(validation.ErrorMessage, CanMoveErrorConstants.ONLY_MOVE_ONE_COLUMN);
        }
コード例 #2
0
        public void MoveOneRowColumnTwoToColumnOne_IsValid()
        {
            //Arrange
            var canMove       = new CanMove_ColumnOneSpace();
            var firstTile     = IslandTileAtRowThreeColumnTwo();
            var secondTile    = IslandTileAtRowThreeColumnOne();
            var currentPlayer = new Player();

            //Act
            var validation = canMove.IsValid(firstTile, secondTile, currentPlayer);

            //Assert
            Assert.AreEqual(validation.IsValid, true);
            Assert.AreEqual(validation.ErrorMessage, null);
        }