private void buttonDeleteOffer_Click(object sender, RoutedEventArgs e) { Offer offer = (Offer)offersListGrid.SelectedItem; _offerController = new OfferController(offer); if (offer != null) { Response response = _offerController.deleteOffer(); if (response.State == ResponseState.SUCCESS) { MessageBox.Show("Offer is successfuly deleted"); } else MessageBox.Show(response.Errors[0].ErrorMessage); } else MessageBox.Show("Please select an offer first to edit"); }
public void deleteOfferTestNormalCase() { OfferController offercontroller = new OfferController(); Response response = offercontroller.deleteOffer(); Assert.AreEqual(response.State, ResponseState.SUCCESS); }