|
|
@ -6,26 +6,28 @@ namespace TestBase;
|
|
|
|
|
|
|
|
|
|
|
|
public class TestBoard
|
|
|
|
public class TestBoard
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public static IEnumerable<object[]> Data_Board()
|
|
|
|
public static TheoryData<bool, int, int, Tile> DataBoard()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
yield return new object[]
|
|
|
|
var data = new TheoryData<bool, int, int, Tile>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
true,
|
|
|
|
{
|
|
|
|
1,
|
|
|
|
true,
|
|
|
|
2,
|
|
|
|
1,
|
|
|
|
new Tile(Shape.Round, Color.Red)
|
|
|
|
2,
|
|
|
|
};
|
|
|
|
new Tile(Shape.Round, Color.Red)
|
|
|
|
yield return new object[]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
false,
|
|
|
|
false,
|
|
|
|
-5,
|
|
|
|
-5,
|
|
|
|
9999,
|
|
|
|
9999,
|
|
|
|
new Tile(Shape.Round, Color.Red)
|
|
|
|
new Tile(Shape.Round, Color.Red)
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Theory]
|
|
|
|
[Theory]
|
|
|
|
[MemberData(nameof(Data_Board))]
|
|
|
|
[MemberData(nameof(DataBoard))]
|
|
|
|
public void Test_BoardAddSolo(bool except, int x, int y, Tile t)
|
|
|
|
public void Test_BoardAddSolo(bool except, int x, int y, Tile t)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
@ -40,14 +42,18 @@ public class TestBoard
|
|
|
|
Assert.True(b.AddTileInCell(x, y, t));
|
|
|
|
Assert.True(b.AddTileInCell(x, y, t));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static IEnumerable<object[]> Data_BoardDouble()
|
|
|
|
public static TheoryData<int, int, Tile> Data_BoardDouble()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
yield return new object[]
|
|
|
|
var data = new TheoryData<int, int, Tile>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
1,
|
|
|
|
{
|
|
|
|
2,
|
|
|
|
1,
|
|
|
|
new Tile(Shape.Round, Color.Red)
|
|
|
|
2,
|
|
|
|
|
|
|
|
new Tile(Shape.Round, Color.Red)
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Theory]
|
|
|
|
[Theory]
|
|
|
|