You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sae201_qwirkle/Qwirkle/TestBase/TestBoard.cs

39 lines
718 B

using QwirkleClassLibrary;
namespace TestBase;
public class TestBoard
{
public static IEnumerable<object[]> Data_Board()
{
yield return new object[]
{
true,
new Cell(0,0),
new Tile(Shape.Round, Color.Red)
};
yield return new object[]
{
false,
new Cell(0,0),
new Tile(Shape.Round, Color.Red)
};
}
[Theory]
[MemberData(nameof(Data_Board))]
public void Test_AddTile(bool except, Cell c, Tile t)
{
if (!except)
{
c.SetTile(t);
Assert.False(c.SetTile(t));
return;
}
Assert.True(c.SetTile(t));
}
}