public void NullPiece()
        {
            var sut = new StandardSelectionPieceValidator();

            var validForSelection = sut.ValidForSelection(null);

            Assert.IsFalse(validForSelection);
        }
        public void InactivePiece()
        {
            var sut = new StandardSelectionPieceValidator();

            var piece = TestHelpers.CreatePiece(0, 0, false);

            var validForSelection = sut.ValidForSelection(piece);

            Assert.IsFalse(validForSelection);
        }
        public void LockedSwap()
        {
            var sut = new StandardSelectionPieceValidator();

            var piece = TestHelpers.CreatePiece(0, 0);

            piece.DestroyPieceHandler = new LockedSwap(piece);

            var validForSelection = sut.ValidForSelection(piece);

            Assert.IsFalse(validForSelection);
        }
        public void ChestPiece()
        {
            var sut = new StandardSelectionPieceValidator();

            var piece = TestHelpers.CreatePiece(0, 0);

            piece.Type = PieceBuilderDirector.PieceTypes.Chest;

            var validForSelection = sut.ValidForSelection(piece);

            Assert.IsFalse(validForSelection);
        }
        public void ValidSelection()
        {
            var sut = new StandardSelectionPieceValidator();

            var go    = new GameObject();
            var piece = go.AddComponent <SquarePiece>();

            go.AddComponent <LerpNotInProgress>();

            var validForSelection = sut.ValidForSelection(piece);

            Assert.IsTrue(validForSelection);
        }
        public void ToBeDestroyed()
        {
            var sut = new StandardSelectionPieceValidator();

            var go    = new GameObject();
            var piece = go.AddComponent <SquarePiece>();

            piece.DestroyPieceHandler = new DestroyTriggerFall(piece);
            piece.DestroyPieceHandler.NotifyOfDestroy();

            var validForSelection = sut.ValidForSelection(piece);

            Assert.IsFalse(validForSelection);
        }