|
|
@ -10,12 +10,12 @@ public class TestGame
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[Theory]
|
|
|
|
[Theory]
|
|
|
|
[InlineData(true, false, "test", "test1")]
|
|
|
|
[InlineData(true, false, "test", "test1")]
|
|
|
|
[InlineData(false, false, "test", "test1")]
|
|
|
|
[InlineData(false, false, "test", "test")]
|
|
|
|
[InlineData(false, true, "test", "test1")]
|
|
|
|
|
|
|
|
public void Test_GameAddPlayerIngame(bool result, bool gamestate, string p1, string p2)
|
|
|
|
public void Test_GameAddPlayerIngame(bool result, bool gamestate, string p1, string p2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Game game = new Game();
|
|
|
|
Game game = new Game();
|
|
|
|
List<string> players = [p1, p2];
|
|
|
|
List<string> players = [p1, p2];
|
|
|
|
|
|
|
|
List<string> players2 = ["patrick", "jeanclaude"];
|
|
|
|
|
|
|
|
|
|
|
|
if (!result)
|
|
|
|
if (!result)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -29,8 +29,9 @@ public class TestGame
|
|
|
|
|
|
|
|
|
|
|
|
if (gamestate)
|
|
|
|
if (gamestate)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
game.AddPlayerInGame(players);
|
|
|
|
game.StartGame();
|
|
|
|
game.StartGame();
|
|
|
|
Assert.False(game.AddPlayerInGame(players));
|
|
|
|
Assert.False(game.AddPlayerInGame(players2));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|