public void GetBottlesWithName_NoSorting_OK() { Bottles resExpected = bottleByName; Bottles resCalculated = new Bottles(); resCalculated = Bottles.GetBottleWithName("bouteille1"); Assert.AreEqual(resExpected, resCalculated); }
private void btnAddBottle_Click(object sender, EventArgs e) { string wineName; LoadSelectedBottles(); if (comboWineChoice.SelectedIndex != -1) { wineName = comboWineChoice.SelectedItem.ToString(); Bottles bot = Bottles.GetBottleWithName(wineName); lstSelectedWines.Add(bot); } else { MessageBox.Show("Aucune bouteille n'est actuellement sélectionnée"); } LoadSelectedBottles(); }