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.
72 lines
1.7 KiB
72 lines
1.7 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using TheGameExtreme.model;
|
|
using TheGameExtreme.model.manager;
|
|
using TheGameExtreme.viewmodel;
|
|
|
|
namespace UnitTestProjectGame
|
|
{
|
|
[TestClass]
|
|
public class UnitTest1
|
|
{
|
|
GameManager g1 = new SoloGameManager(2, new List<String> { "clement", " baptiste" });
|
|
[TestMethod]
|
|
public void JoueTest()
|
|
{
|
|
object expectedRes = null;
|
|
int valueCard = 89;
|
|
int orderedStackSelected = 3;
|
|
|
|
g1.joue(valueCard, orderedStackSelected);
|
|
Assert.AreEqual(expectedRes, null);
|
|
}
|
|
|
|
[TestMethod]
|
|
public void isCanPlayTest()
|
|
{
|
|
List<Card> currentHhand = new List<Card>();
|
|
bool valeur;
|
|
bool expected1 = true;
|
|
bool expected2 = false;
|
|
g1.isCanPlay();
|
|
|
|
|
|
if(g1.isCanPlay() == true)
|
|
{
|
|
valeur = true;
|
|
Assert.AreEqual(expected1, valeur);
|
|
}
|
|
/*else
|
|
{
|
|
//Exception à gérer//
|
|
}*/
|
|
|
|
if(g1.isCanPlay() == false)
|
|
{
|
|
valeur = false;
|
|
Assert.Equals(expected2, valeur);
|
|
}
|
|
else
|
|
{
|
|
//Exception à gérer//
|
|
}
|
|
}
|
|
|
|
[TestMethod]
|
|
public void EndTurnTest()
|
|
{
|
|
object expectedRes = null;
|
|
|
|
g1.endTurn();
|
|
Assert.AreEqual(expectedRes, null);
|
|
}
|
|
|
|
[TestMethod]
|
|
public void getCurentIndexPlayerTest()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|