public void UpdateAsync_ProfileNull_ThrowArgumentNullException() { WrikeUserProfile profile = null; var ex = Assert.ThrowsAsync <ArgumentNullException>(() => TestConstants.WrikeClient.Users.UpdateAsync("id", profile)); Assert.AreEqual("profile", ex.ParamName); }
async Task <WrikeUser> IWrikeUsersClient.UpdateAsync(WrikeClientIdParameter id, WrikeUserProfile profile) { if (profile == null) { throw new ArgumentNullException(nameof(profile)); } var contentBuilder = new WrikeFormUrlEncodedContentBuilder() .AddParameter("profile", profile); var response = await SendRequest <WrikeUser>($"users/{id}", HttpMethods.Put, contentBuilder.GetContent()).ConfigureAwait(false); return(GetReponseDataFirstItem(response)); }