public async Task UpdateProfile_Test() { /* arrange */ string about = Guid.NewGuid().ToString("N"); string location = Guid.NewGuid().ToString("N"); string url = string.Format("http://{0}.com", Guid.NewGuid().ToString("N")); var request = DisqusUserUpdateProfileRequest .New() .Name(TestData.UserName) .About(about) .Location(location) .Url(url); /* act */ var response = await Disqus.Users .UpdateProfileAsync(DisqusAccessToken.Create(TestData.AccessToken), request) .ConfigureAwait(false); /* assert */ Assert.That(response, Is.Not.Null); Assert.That(response.Code, Is.Not.Null); Assert.That(response.Response.Name, Is.EqualTo(TestData.UserName)); Assert.That(response.Response.Location, Is.EqualTo(location)); Assert.That(response.Response.About, Is.EqualTo(about)); Assert.That(response.Response.Url, Is.EqualTo(url)); }
public async Task <DisqusResponse <DisqusUser> > UpdateProfileAsync(DisqusAccessToken accessToken, DisqusUserUpdateProfileRequest request) { Collection <KeyValuePair <string, string> > parameters = Parameters .WithParameter("access_token", accessToken) .WithMultipleParameters(request.Parameters); return(await RequestProcessor .ExecuteAsync <DisqusResponse <DisqusUser> >(DisqusRequestMethod.Post, DisqusEndpoints.Users.UpdateProfile, parameters) .ConfigureAwait(false)); }