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);