|
|
|
@ -24,7 +24,7 @@ namespace UnitTesting
|
|
|
|
|
[Fact]
|
|
|
|
|
public void TestSecondConstructorValidArguments()
|
|
|
|
|
{
|
|
|
|
|
Jeton?[] jetons = [new Jeton(Couleur.ROUGE), new Jeton(Couleur.BLEU), new Jeton(Couleur.BLEU)];
|
|
|
|
|
Jeton[] jetons = [new Jeton(Couleur.ROUGE), new Jeton(Couleur.BLEU), new Jeton(Couleur.BLEU)];
|
|
|
|
|
|
|
|
|
|
Code code = new Code(jetons);
|
|
|
|
|
Assert.NotNull(code);
|
|
|
|
@ -52,7 +52,7 @@ namespace UnitTesting
|
|
|
|
|
public void TestAjouterJetonInvalid()
|
|
|
|
|
{
|
|
|
|
|
Code code = new Code([new Jeton(Couleur.NOIR)]);
|
|
|
|
|
Assert.Throws<Exception>(() => code.AjouterJeton(new Jeton(Couleur.ROUGE)));
|
|
|
|
|
Assert.Throws<CodeTableauLesJetonsCompletException>(() => code.AjouterJeton(new Jeton(Couleur.ROUGE)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|