passer la main
continuous-integration/drone/push Build is passing Details

master
Céleste BARBOSA 11 months ago
parent b8d3ba4b7f
commit 527f7003a0

@ -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]

Loading…
Cancel
Save