From 22da04e31804b6e4245921e84d543a9999e8652d Mon Sep 17 00:00:00 2001 From: "nicolas.barbosa" Date: Fri, 17 May 2024 22:11:02 +0200 Subject: [PATCH] tentative x2000 --- Sources/UnitTesting/ReglesClassiquesUT.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Sources/UnitTesting/ReglesClassiquesUT.cs b/Sources/UnitTesting/ReglesClassiquesUT.cs index 69c9059..5c03c57 100644 --- a/Sources/UnitTesting/ReglesClassiquesUT.cs +++ b/Sources/UnitTesting/ReglesClassiquesUT.cs @@ -51,23 +51,28 @@ namespace UnitTesting regles.CommencerLaPartie(); int? joueurCourantAvant = (int?) fieldInfo.GetValue(regles); + Joueur courantAvant = regles.JoueurCourant(); Assert.NotNull(joueurCourantAvant); Assert.Equal(0, joueurCourantAvant); regles.PasserLaMain(); int? joueurCourantApres = (int?)fieldInfo.GetValue(regles); + Joueur courantApres = regles.JoueurCourant(); Assert.NotNull(joueurCourantApres); Assert.Equal(1, joueurCourantApres); Assert.NotEqual(joueurCourantAvant, joueurCourantApres); - /* + Assert.NotEqual(courantAvant, courantApres); + regles.PasserLaMain(); int? joueurCourantBoucle = (int?)fieldInfo.GetValue(regles); + Joueur courantBoucle = regles.JoueurCourant(); Assert.NotNull(joueurCourantBoucle); Assert.Equal(0, joueurCourantBoucle); Assert.NotEqual(joueurCourantApres, joueurCourantBoucle); - Assert.Equal(joueurCourantAvant, joueurCourantBoucle);*/ + Assert.Equal(joueurCourantAvant, joueurCourantBoucle); + Assert.NotEqual(courantApres, courantBoucle); } [Fact] @@ -95,7 +100,7 @@ namespace UnitTesting Assert.False(regles.EstTerminee()); - fieldInfo.SetValue(regles, 0); + regles.PasserLaMain(); Plateau plateauj1 = regles.JoueurCourant().Plateau; type = typeof(Plateau);