public void LeaveFeedback()
 {
     Assert.IsNotNull(TestData.NewItem, "Failed because no item available -- requires successful AddItem test");
     //
     LeaveFeedbackCall api = new LeaveFeedbackCall(this.apiContext);
     FeedbackDetailType fb = new FeedbackDetailType();
     api.ItemID = TestData.NewItem.ItemID;
     api.CommentText = "SDK Sanity test feedback";
     api.CommentType = CommentTypeCodeType.Positive;
     api.TransactionID = "0";
     api.TargetUser = "******";
     // Make API call.
     ApiException gotException = null;
     try {
     api.Execute();
     }
     catch (ApiException ex) {
         gotException = ex;
     }
     Assert.IsNotNull(gotException);
 }
Exemple #2
0
        private void BtnLeaveFeedback_Click(object sender, System.EventArgs e)
        {
            try
            {
                TxtStatus.Text = "";
                LeaveFeedbackCall apicall = new LeaveFeedbackCall(Context);

                CommentTypeCodeType type = (CommentTypeCodeType)Enum.Parse(typeof(CommentTypeCodeType), CboType.SelectedItem.ToString());

                apicall.LeaveFeedback(TxtUserId.Text, TxtItemId.Text, TxtTransactionId.Text, type, TxtComments.Text);
                TxtStatus.Text = apicall.ApiResponse.Ack.ToString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }