コード例 #1
0
        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");

        
        }
コード例 #2
0
 public void deleteOfferTestNormalCase()
 {
     OfferController offercontroller = new OfferController();
     Response response = offercontroller.deleteOffer();
     Assert.AreEqual(response.State, ResponseState.SUCCESS);
 }