tentative x2000
continuous-integration/drone/push Build is passing Details

master
Céleste BARBOSA 11 months ago
parent 8661e7a797
commit 22da04e318

@ -51,23 +51,28 @@ namespace UnitTesting
regles.CommencerLaPartie(); regles.CommencerLaPartie();
int? joueurCourantAvant = (int?) fieldInfo.GetValue(regles); int? joueurCourantAvant = (int?) fieldInfo.GetValue(regles);
Joueur courantAvant = regles.JoueurCourant();
Assert.NotNull(joueurCourantAvant); Assert.NotNull(joueurCourantAvant);
Assert.Equal(0, joueurCourantAvant); Assert.Equal(0, joueurCourantAvant);
regles.PasserLaMain(); regles.PasserLaMain();
int? joueurCourantApres = (int?)fieldInfo.GetValue(regles); int? joueurCourantApres = (int?)fieldInfo.GetValue(regles);
Joueur courantApres = regles.JoueurCourant();
Assert.NotNull(joueurCourantApres); Assert.NotNull(joueurCourantApres);
Assert.Equal(1, joueurCourantApres); Assert.Equal(1, joueurCourantApres);
Assert.NotEqual(joueurCourantAvant, joueurCourantApres); Assert.NotEqual(joueurCourantAvant, joueurCourantApres);
/* Assert.NotEqual(courantAvant, courantApres);
regles.PasserLaMain(); regles.PasserLaMain();
int? joueurCourantBoucle = (int?)fieldInfo.GetValue(regles); int? joueurCourantBoucle = (int?)fieldInfo.GetValue(regles);
Joueur courantBoucle = regles.JoueurCourant();
Assert.NotNull(joueurCourantBoucle); Assert.NotNull(joueurCourantBoucle);
Assert.Equal(0, joueurCourantBoucle); Assert.Equal(0, joueurCourantBoucle);
Assert.NotEqual(joueurCourantApres, joueurCourantBoucle); Assert.NotEqual(joueurCourantApres, joueurCourantBoucle);
Assert.Equal(joueurCourantAvant, joueurCourantBoucle);*/ Assert.Equal(joueurCourantAvant, joueurCourantBoucle);
Assert.NotEqual(courantApres, courantBoucle);
} }
[Fact] [Fact]
@ -95,7 +100,7 @@ namespace UnitTesting
Assert.False(regles.EstTerminee()); Assert.False(regles.EstTerminee());
fieldInfo.SetValue(regles, 0); regles.PasserLaMain();
Plateau plateauj1 = regles.JoueurCourant().Plateau; Plateau plateauj1 = regles.JoueurCourant().Plateau;
type = typeof(Plateau); type = typeof(Plateau);

Loading…
Cancel
Save