diff --git a/Qwirkle/TestBase/TestBoard.cs b/Qwirkle/TestBase/TestBoard.cs index 3a58795..9d18921 100644 --- a/Qwirkle/TestBase/TestBoard.cs +++ b/Qwirkle/TestBase/TestBoard.cs @@ -3,59 +3,60 @@ namespace TestBase; namespace TestBase { -public class TestBoard -{ - public static IEnumerable Data_Board() + public class TestBoard { - yield return new object[] + public static IEnumerable Data_Board() { + yield return new object[] + { true, 1, 2, new Tile(Shape.Round, Color.Red) - }; - yield return new object[] - { + }; + yield return new object[] + { false, -5, 9999, new Tile(Shape.Round, Color.Red) - }; - } + }; + } - [Theory] - [MemberData(nameof(Data_Board))] - public void Test_BoardAddSolo(bool except, int x, int y, Tile t) - { + [Theory] + [MemberData(nameof(Data_Board))] + public void Test_BoardAddSolo(bool except, int x, int y, Tile t) + { - Board b = new Board(); + Board b = new Board(); - if (!except) - { - Assert.False(b.AddTileInCell(x, y, t)); - return; - + if (!except) + { + Assert.False(b.AddTileInCell(x, y, t)); + return; + + } + Assert.True(b.AddTileInCell(x, y, t)); } - Assert.True(b.AddTileInCell(x, y, t)); - } - public static IEnumerable Data_BoardDouble() - { - yield return new object[] + public static IEnumerable Data_BoardDouble() { + yield return new object[] + { 1, 2, new Tile(Shape.Round, Color.Red) - }; - } + }; + } - [Theory] - [MemberData(nameof(Data_BoardDouble))] - public void Test_BoardFree(int x, int y, Tile t) - { - Board board = new Board(); - board.AddTileInCell(x, y, t); - Assert.False(board.AddTileInCell(x,y, t)); + [Theory] + [MemberData(nameof(Data_BoardDouble))] + public void Test_BoardFree(int x, int y, Tile t) + { + Board board = new Board(); + board.AddTileInCell(x, y, t); + Assert.False(board.AddTileInCell(x, y, t)); + } } }