|
|
|
@ -45,14 +45,15 @@ public class TestBoard
|
|
|
|
|
Assert.True(b.AddTileInCell(x, y, t));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static TheoryData<int, int, Tile> Data_BoardDouble()
|
|
|
|
|
public static TheoryData<int, int, Shape, Color> Data_BoardDouble()
|
|
|
|
|
{
|
|
|
|
|
var data = new TheoryData<int, int, Tile>
|
|
|
|
|
var data = new TheoryData<int, int, Shape, Color>
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
1,
|
|
|
|
|
2,
|
|
|
|
|
new Tile(Shape.Round, Color.Red)
|
|
|
|
|
Shape.Round,
|
|
|
|
|
Color.Red
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -61,8 +62,9 @@ public class TestBoard
|
|
|
|
|
|
|
|
|
|
[Theory]
|
|
|
|
|
[MemberData(nameof(Data_BoardDouble))]
|
|
|
|
|
public void Test_BoardFree(int x, int y, Tile t)
|
|
|
|
|
public void Test_BoardFree(int x, int y, Shape s, Color c)
|
|
|
|
|
{
|
|
|
|
|
Tile t = new(s, c);
|
|
|
|
|
Board board = new Board(12, 12);
|
|
|
|
|
board.AddTileInCell(x, y, t);
|
|
|
|
|
Assert.False(board.AddTileInCell(x, y, t));
|
|
|
|
@ -93,8 +95,6 @@ public class TestBoard
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Assert.False(board.HasOccupiedCase());
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Theory]
|
|
|
|
@ -112,8 +112,6 @@ public class TestBoard
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Assert.Null(board.GetCell(900, 900));
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
[Fact]
|
|
|
|
|
public void Test_EventBoard()
|
|
|
|
|