test
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
e24c8a8828
commit
f57eeb6b0c
@ -0,0 +1,39 @@
|
||||
using QwirkleClassLibrary;
|
||||
namespace TestBase;
|
||||
|
||||
public class TestTileBag
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(false, 5)]
|
||||
[InlineData(false, -5)]
|
||||
[InlineData(true, 2)]
|
||||
|
||||
public void Test_TileBagConstructor(bool isValid, int nbset)
|
||||
{
|
||||
if (!isValid)
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => new TileBag(nbset));
|
||||
return;
|
||||
}
|
||||
TileBag bag = new TileBag(nbset);
|
||||
Assert.Equal(bag.TilesBag.Count, nbset);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Test_AddTileInBag()
|
||||
{
|
||||
Tile t = null;
|
||||
Tile tok = new(Shape.Club, Color.Green);
|
||||
TileBag bag = new TileBag(2);
|
||||
|
||||
if (bag.AddTileInBag(t) == false)
|
||||
{
|
||||
Assert.True(bag.AddTileInBag(tok));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in new issue