testttt
continuous-integration/drone/push Build is passing Details

test_old_branch
Jérémy Mouyon 11 months ago
parent 923544b482
commit 44739a89f1

@ -1,4 +1,5 @@
using QwirkleClassLibrary.Players;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace TestBase;
public class TestScore
@ -13,5 +14,15 @@ public class TestScore
Assert.True(score.PlayerName == "test");
}
[Fact]
public void Test_ScoreString()
{
Player p = new Player("test");
DateTime now = DateTime.Today;
Score score = new Score(p.NameTag, now, 0, 0);
Assert.Equal(score.ToString(), p.NameTag + " Date last game :" + now.ToString() + " Points :" + 0 + " Win : " + 0);
}
}

@ -19,19 +19,26 @@ public class TestTileBag
Assert.Equal(bag.TilesBag.Count, nbset * 36);
}
[Fact]
public void Test_AddTileInBag()
[Theory]
[InlineData(true)]
[InlineData(false)]
public void Test_AddTileInBag(bool select)
{
Tile? t = null;
Tile tok = new(Shape.Club, Color.Green);
TileBag bag = new TileBag(2);
if (t != null && bag.AddTileInBag(t) == false)
if (select)
{
Assert.True(bag.AddTileInBag(tok));
return;
}
Assert.False(bag.AddTileInBag(t));
return;
}
[Fact]

Loading…
Cancel
Save