public void CanHandleSuccessfulDeleteFriendRequestResponse() { MockHttpMessageHandler.SetResponse(new JObject( new JProperty("success", new JObject( new JProperty("message", "some message"), new JProperty("status_code", 200))))); var api = new FriendsApi(); var result = api.DeleteFriend("some user id").Result; result.Should().NotBeNullOrEmpty(); }
async void OnButtonClicked2(object sender, EventArgs e) { try { var response = await DisplayAlert("Question", "delete friend ?", "YES", "NO"); if (response) { errcode ercode = await FriendsApi.DeleteFriend(usid.Text); await DisplayAlert(ercode.success.status_code, ercode.success.message, "ok"); } } catch { await DisplayAlert("errer", " now, not your friend.", "ok"); } }