Пример #1
0
        public void GivenHideNotValidTiles_WhenExecute_ThenHideAllMatchTilesNotOfType()
        {
            MatchTile matchTile = new MatchTile();

            matchTile.canTouch   = true;
            matchTile.position   = Vector2.zero;
            matchTile.tileObject = new GameObject();

            List <MatchTile> matchTiles = new List <MatchTile>();

            matchTiles.Add(matchTile);
            matchTileGridModel.GetTilesTouched().Returns(matchTiles);

            IMatchTileComponent matchTileComponenet = Substitute.For <IMatchTileComponent> ();

            matchTileGridModel.GetMatchTileComponent(Arg.Any <MatchTile>()).Returns(matchTileComponenet);

            matchTileGridModel.GetAllMatchTilesNotOfType(Arg.Any <MatchTileType> ()).Returns(matchTiles);

            hideInvalidTilesCommand.hideType = HideType.NotValidTiles;
            hideInvalidTilesCommand.Execute();

            matchTileComponenet.Received().Hide();
        }
Пример #2
0
 private void HideInvalidTiles(MatchTileType type)
 {
     hideInvalidTilesCommand.type     = type;
     hideInvalidTilesCommand.hideType = HideType.NotValidTiles;
     hideInvalidTilesCommand.Execute();
 }