fixed some code smelt
continuous-integration/drone/push Build is passing Details

test_old_branch
Jules LASCRET 11 months ago
parent 974a510aa4
commit 92adef32f4

@ -15,7 +15,7 @@ namespace QwirkleClassLibrary
{
if (p == null)
{
throw new NullReferenceException("player");
throw new ArgumentNullException(nameof(p), "player cannot be null");
}
else
{ PlayerScore = 0;

@ -62,7 +62,7 @@ public class TestBoard
{
Board board = new Board(12, 12);
Assert.Equal((12 * 12), board.GetCells().Count());
Assert.Equal((12 * 12), board.GetCells().Count);
}
[Fact]
@ -82,7 +82,7 @@ public class TestBoard
}
ReadOnlyCollection<Cell> readCells = cells.AsReadOnly();
Assert.Equal(readCells.Count(), board.GetReadCells().Count());
Assert.Equal(readCells.Count, board.GetReadCells().Count);
}

@ -8,11 +8,12 @@ public class TestScore
//[InlineData(true)]
public void Test_CellScoreConstructor(bool except)
{
/*if (!except)
if (!except)
{
Assert.Throws<ArgumentNullException>(() => new Score(null));
return;
}*/
}
Player? p = new Player("test");
Score score = new Score(p);
Assert.True(true);

Loading…
Cancel
Save