Beispiel #1
0
        private void Valider_Click(object sender, RoutedEventArgs e)
        {
            Pokemon poke1 = new Pokemon();
            Pokemon poke2 = new Pokemon();

            poke1 = (Pokemon)pokemon1.SelectedItem;
            poke2 = (Pokemon)pokemon2.SelectedItem;
            if (poke1 == null || poke2 == null)
            {
                avertissement.Text = "Veuillez bien entrer 2 pokemons";
            }
            else if (poke1 == poke2)
            {
                avertissement.Text = "Vous ne pouvez pas choisir le meme pokemon";
            }
            else
            {
                Match newmatch = new Match(poke1, poke2);
                TheTournoi.AjouterMatch(newmatch);
                BManager.getMatch().Add(newmatch);
                TournoiWindow win = new TournoiWindow(TheTournoi);
                win.Show();
                this.Close();
            }
        }
Beispiel #2
0
        public void TestgetMatch()
        {
            BusinessLayer.BusinessManager bm = new BusinessLayer.BusinessManager();

            var res = bm.getMatch();

            Assert.AreEqual(2, res.Count);
        }