You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
676 B
43 lines
676 B
using QwirkleClassLibrary;
|
|
namespace TestBase;
|
|
|
|
public class TestScore
|
|
{
|
|
public static IEnumerable<object[]> Data_Score()
|
|
{
|
|
yield return new object[]
|
|
{
|
|
true,
|
|
new Player("Test"),
|
|
};
|
|
yield return new object[]
|
|
{
|
|
false,
|
|
null,
|
|
};
|
|
}
|
|
|
|
[Theory]
|
|
[MemberData(nameof(Data_Score))]
|
|
public void Test_CellScoreConstructor(bool except, Player p)
|
|
{
|
|
if (!except)
|
|
{
|
|
Assert.Throws<ArgumentNullException>(() => new Score(p));
|
|
return;
|
|
}
|
|
Score score = new Score(p);
|
|
Assert.True(true);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|