public void SetUp() { serviceMatchClient = new ServiceMatchClient(); }
/// <summary> /// Permet de charger les matches depuis le web services /// </summary> private void LoadMatches() { ServiceMatchClient clientMatch = null; try { clientMatch = new ServiceMatchClient(); clientMatch.GetAllMatches().ToList().ForEach(match => { matches.Add((QuidditchWebSite.Match)FabriqueMatch.FabriquerMatch(match)); RbList.Items.Add(new ListItem(FabriqueMatch.FabriquerMatch(match).ToString())); }); } catch (Exception ex) { LbListMatch.Text = "Erreur : Impossible de charger la liste des matches"; BtnReserver.Enabled = false; } finally { if (clientMatch != null) { clientMatch.Close(); } } }