public void GivenNoObjectOnScreen_WhenExecute_ThenNoActionTaken() { calculateTouchCommand.touchedPosition = Vector3.zero; calculateTouchCommand.Execute(); eventDispatcher.DidNotReceive().Broadcast(TouchMessage.OBJECT_TOUCHED_2D, Arg.Any <TouchedObject> ()); }
public void GivenMatchTilesPopulatedWithMatches_WhenExecute_ThenDontShuffleGrid() { matchTileGridModel.gridSize = new Vector2(2, 2); Vector2 first = new Vector2(0, 0); Vector2 second = new Vector2(0, 1); Vector2 third = new Vector2(1, 0); Vector2 fourth = new Vector2(1, 1); MatchTile firstMatch = CreateMatchTile(MatchTileType.MatchToken_A, first); MatchTile secondMatch = CreateMatchTile(MatchTileType.MatchToken_A, second); MatchTile thirdMatch = CreateMatchTile(MatchTileType.MatchToken_A, third); MatchTile fourthMMatch = CreateMatchTile(MatchTileType.MatchToken_A, fourth); Dictionary <Vector2, MatchTile> matchTilesDic = new Dictionary <Vector2, MatchTile> (); matchTilesDic [first] = firstMatch; matchTilesDic [second] = secondMatch; matchTilesDic [third] = thirdMatch; matchTilesDic [fourth] = fourthMMatch; matchTileGridModel.GetMatchTiles().Returns(matchTilesDic); matchTileGridModel.GetMatchTile(first).Returns(matchTilesDic [first]); matchTileGridModel.GetMatchTile(second).Returns(matchTilesDic [second]); matchTileGridModel.GetMatchTile(third).Returns(matchTilesDic [third]); matchTileGridModel.GetMatchTile(fourth).Returns(matchTilesDic [fourth]); matchTileGridModel.GetHintMatchTiles().Returns(new List <MatchTile>()); checkMovesRemainingCommand.Execute(); eventDispatcher.DidNotReceive().Broadcast(MatchTileGridMessage.SHUFFLE_GRID); }