public static void RunTests(EchipaService echipaService, ElevService elevService, JucatorActivService jucatorActivService, JucatorService jucatorService, MeciService meciService) { Debug.Assert(jucatorActivService.jucatoriActiviEchipaMeci(1, 1, jucatorService).Count != 0); Debug.Assert(jucatorActivService.jucatoriActiviEchipaMeci(1, 2, jucatorService).Count != 0); Debug.Assert(jucatorActivService.jucatoriActiviEchipaMeci(2, 1, jucatorService).Count != 0); Debug.Assert(jucatorActivService.jucatoriActiviEchipaMeci(2, 3, jucatorService).Count != 0); Debug.Assert(jucatorService.jucatoriEchipa(1).Count == 15); Debug.Assert(jucatorService.jucatoriEchipa(2).Count == 15); Debug.Assert(jucatorService.jucatoriEchipa(3).Count == 15); Debug.Assert(jucatorActivService.scorMeci(1, meciService, jucatorService) != ""); Debug.Assert(jucatorActivService.scorMeci(2, meciService, jucatorService) != ""); Debug.Assert(jucatorActivService.scorMeci(3, meciService, jucatorService) != ""); Debug.Assert(meciService.meciuriPerioada(DateTime.Parse("12/01/2019"), DateTime.Parse("12/03/2019")).Count == 1); Debug.Assert(meciService.meciuriPerioada(DateTime.Parse("12/05/2012"), DateTime.Parse("12/02/2016")).Count == 0); Debug.Assert(meciService.meciuriPerioada(DateTime.Parse("12/02/2019"), DateTime.Parse("12/05/2019")).Count == 1); }
private void jucatoriiUneiEchipe() { Console.WriteLine("Dati id echipa:"); int id; bool ok = int.TryParse(Console.ReadLine(), out id); if (ok) { foreach (Jucator jucator in jucatorService.jucatoriEchipa(id)) { Console.WriteLine(jucator.ToString()); } Console.WriteLine(); } else { Console.WriteLine("Id-ul trebuie sa fie numeric"); } }