code smell
continuous-integration/drone/push Build is passing Details

master
Camille TURPIN-ETIENNE 11 months ago
parent be7317210d
commit b1b19c77f5

@ -37,23 +37,24 @@ namespace UnitTesting
PropertyInfo? termineField = typeof(Partie).GetProperty("Termine", BindingFlags.Public | BindingFlags.Instance); PropertyInfo? termineField = typeof(Partie).GetProperty("Termine", BindingFlags.Public | BindingFlags.Instance);
if (joueursField != null && plateauxField != null)
{
Dictionary<string, bool>? joueurs = joueursField.GetValue(partieOriginale) as Dictionary<string, bool>; Dictionary<string, bool>? joueurs = joueursField.GetValue(partieOriginale) as Dictionary<string, bool>;
if (joueurs != null) if (joueurs != null)
{ {
joueurs.Add("Joueur1", false); joueurs.Add("Joueur1", false);
joueurs.Add("Joueur2", true); joueurs.Add("Joueur2", true);
} }
List<Plateau>? plateaux = plateauxField.GetValue(partieOriginale) as List<Plateau>; List<Plateau>? plateaux = plateauxField.GetValue(partieOriginale) as List<Plateau>;
if (plateaux != null) if (plateaux != null)
{ {
plateaux.Add(new Plateau(4, 10)); plateaux.Add(new Plateau(4, 10));
plateaux.Add(new Plateau(4, 10)); plateaux.Add(new Plateau(4, 10));
} }
if(tourField != null) if(tourField != null)
tourField.SetValue(partieOriginale, 5); tourField.SetValue(partieOriginale, 5);
@ -97,4 +98,5 @@ namespace UnitTesting
} }
} }
} }
}
} }

Loading…
Cancel
Save