diff --git a/Sources/UnitTesting/ReglesClassiquesUT.cs b/Sources/UnitTesting/ReglesClassiquesUT.cs index 434bca5..dfc3b6a 100644 --- a/Sources/UnitTesting/ReglesClassiquesUT.cs +++ b/Sources/UnitTesting/ReglesClassiquesUT.cs @@ -52,21 +52,24 @@ namespace UnitTesting FieldInfo? fieldInfo = type.GetField("joueurCourant", BindingFlags.NonPublic | BindingFlags.Instance); Assert.NotNull(fieldInfo); - int? joueurCourant = (int?) fieldInfo.GetValue(regles); - Assert.NotNull(joueurCourant); - Assert.Equal(0, joueurCourant); + int? joueurCourantAvant = (int?) fieldInfo.GetValue(regles); + Assert.NotNull(joueurCourantAvant); + Assert.Equal(0, joueurCourantAvant); regles.PasserLaMain(); - joueurCourant = (int?)fieldInfo.GetValue(regles); - Assert.NotNull(joueurCourant); - Assert.Equal(1, joueurCourant); + int? joueurCourantApres = (int?)fieldInfo.GetValue(regles); + Assert.NotNull(joueurCourantApres); + Assert.Equal(1, joueurCourantApres); + Assert.NotEqual(joueurCourantAvant, joueurCourantApres); regles.PasserLaMain(); - joueurCourant = (int?)fieldInfo.GetValue(regles); - Assert.NotNull(joueurCourant); - Assert.Equal(0, joueurCourant); + int? joueurCourantBoucle = (int?)fieldInfo.GetValue(regles); + Assert.NotNull(joueurCourantBoucle); + Assert.Equal(0, joueurCourantBoucle); + Assert.NotEqual(joueurCourantApres, joueurCourantBoucle); + Assert.Equal(joueurCourantAvant, joueurCourantBoucle); } [Fact]