|
|
|
@ -11,6 +11,9 @@ namespace UnitTestProjectGame
|
|
|
|
|
public class UnitTest1
|
|
|
|
|
{
|
|
|
|
|
GameManager g1 = new SoloGameManager(2, new List<String> { "clement", " baptiste" });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
|
public void JoueTest()
|
|
|
|
|
{
|
|
|
|
@ -25,7 +28,6 @@ namespace UnitTestProjectGame
|
|
|
|
|
[TestMethod]
|
|
|
|
|
public void isCanPlayTest()
|
|
|
|
|
{
|
|
|
|
|
List<Card> currentHhand = new List<Card>();
|
|
|
|
|
bool valeur;
|
|
|
|
|
bool expected1 = true;
|
|
|
|
|
bool expected2 = false;
|
|
|
|
@ -56,16 +58,30 @@ namespace UnitTestProjectGame
|
|
|
|
|
[TestMethod]
|
|
|
|
|
public void EndTurnTest()
|
|
|
|
|
{
|
|
|
|
|
object expectedRes = null;
|
|
|
|
|
bool valueExpected = false;
|
|
|
|
|
bool valueExpected1 = true;
|
|
|
|
|
bool valueBool;
|
|
|
|
|
valueBool = g1.endTurn();
|
|
|
|
|
|
|
|
|
|
g1.endTurn();
|
|
|
|
|
Assert.AreEqual(expectedRes, null);
|
|
|
|
|
if (valueBool == false)
|
|
|
|
|
{
|
|
|
|
|
Assert.AreEqual(valueExpected, valueBool);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Assert.AreEqual(valueExpected1, valueExpected1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
|
public void getCurentIndexPlayerTest()
|
|
|
|
|
{
|
|
|
|
|
int indexCurrentPlayerExpected = 0;
|
|
|
|
|
int index;
|
|
|
|
|
index = g1.getCurentIndexPlayer();
|
|
|
|
|
|
|
|
|
|
Assert.AreEqual(indexCurrentPlayerExpected, index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|