delete of uselesse conditoin and remove in test
continuous-integration/drone/push Build is passing Details

test_old_branch
Jérémy Mouyon 11 months ago
parent 44739a89f1
commit 377c81c48c

@ -36,10 +36,6 @@ namespace QwirkleClassLibrary.Tiles
public bool AddTileInBag(Tile tile)
{
if (tile == null)
{
return false;
}
tiles.Add(tile);
return true;
}

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

Loading…
Cancel
Save