|
|
@ -1,4 +1,5 @@
|
|
|
|
using QwirkleClassLibrary.Boards;
|
|
|
|
using QwirkleClassLibrary.Boards;
|
|
|
|
|
|
|
|
using QwirkleClassLibrary.Players;
|
|
|
|
using QwirkleClassLibrary.Tiles;
|
|
|
|
using QwirkleClassLibrary.Tiles;
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
namespace TestBase;
|
|
|
|
namespace TestBase;
|
|
|
@ -105,7 +106,23 @@ public class TestBoard
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
|
|
|
public void Test_EventBoard()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Board board = new(12, 12);
|
|
|
|
|
|
|
|
Tile tile = new(Shape.Club, Color.Red);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool eventRaised = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
board.PropertyChanged += (sender, args) =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
eventRaised = true;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
board.AddTileInCell(1, 1, tile);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Assert.True(eventRaised);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|