test
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
9d22b46d0f
commit
ebc768683c
@ -0,0 +1,38 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in new issue