public void WhenPieceAnimation_IsComplete_PieceState_IsSelectable() { GamePiecePM systemUnderTest = CreateSystem(); systemUnderTest.ViewModel.SetProperty(GamePiecePM.IS_ON_PROPERTY, Color.yellow); systemUnderTest.OnAnimationComplete(); MockPiece.Received().State = GamePieceStates.Selectable; }
public void WhenChainCanceled_PiecesInChain_AreFailed() { systemUnderTest.Chain = new List <IGamePiece>(); IGamePiece mockPiece = Substitute.For <IGamePiece>(); systemUnderTest.Chain.Add(mockPiece); systemUnderTest.CancelChain(); mockPiece.Received().PieceFailedMatch(); }
public void WhenProcessingChain_IfChainDoesNotMatchAnyMonster_PiecesFailedMatch_IsCalled() { IGamePiece mockPiece = Substitute.For <IGamePiece>(); List <IGamePiece> chain = new List <IGamePiece>() { mockPiece }; MonsterManager.DoesMoveMatchAnyCurrentMonsters(Arg.Any <List <IGamePiece> >()).Returns(false); systemUnderTest.Process(chain); mockPiece.Received().PieceFailedMatch(); }