public void TestCanSwapMethodToReturnFalseValueWhenCurrentTileCannotBeSwapped() { var grid = new Grid(); for (int i = 0; i < 5; i++) { var tile = new Tile(string.Empty + i + string.Empty, i, TileType.Number); grid.AddTile(tile); } var emptyTile = new Tile(string.Empty, GlobalConstants.TotalTilesCount - 1, TileType.Empty); grid.AddTile(emptyTile); var tileToTest = grid.GetTileFromLabel("1"); var actual = grid.CanSwap(tileToTest); var expected = false; Assert.AreEqual(expected, actual); }
public void TestCanSwapMethodToReturnFalseValueWhenCurrentTileCanBeSwapped() { var grid = new Grid(); for (int i = 0; i < 5; i++) { var tile = new Tile(i.ToString(), i, TileType.Number); grid.AddTile(tile); } var emptyTile = new Tile(string.Empty, 5, TileType.Empty); grid.AddTile(emptyTile); var tileToTest = grid.GetTileFromLabel("4"); var actual = grid.CanSwap(tileToTest); var expected = true; Assert.AreEqual(expected, actual); }