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