private static void AssertOnEmailSettings(SurveyEmailSettings expected, SurveyEmailSettings actual) { Assert.Equal(expected.Id, actual.Id); Assert.Equal(expected.FromAddress, actual.FromAddress); Assert.Equal(expected.FromName, actual.FromName); Assert.Equal(expected.PostalAddress, actual.PostalAddress); Assert.Equal(expected.ReplyToAddress, actual.ReplyToAddress); }
public Task <SurveyEmailSettings> PutAsync(string surveyId, SurveyEmailSettings settings) { Ensure.ArgumentNotNullOrEmptyString(surveyId, nameof(surveyId)); Ensure.ArgumentNotNull(settings, nameof(settings)); var uri = SurveyEmailSettingsUrl(surveyId); return(Client.PutAsJsonAsync(uri, settings) .ContinueWith(task => JsonConvert.DeserializeObject <SurveyEmailSettings>( task.Result.Content.ReadAsStringAsync().Result)) .FlattenExceptions()); }