public RemoveAsync ( string surveyId, int languageId, Nfield.Models.Translation translation ) : System.Threading.Tasks.Task | ||
surveyId | string | |
languageId | int | |
translation | Nfield.Models.Translation | |
return | System.Threading.Tasks.Task |
public Task RemoveAsync(string surveyId, int languageId, Translation translation)
{
CheckSurveyId(surveyId);
if (translation == null)
{
throw new ArgumentNullException("translation");
}
return
Client.DeleteAsync(TranslationsApi(surveyId, languageId, translation.Name).AbsoluteUri)
.FlattenExceptions();
}
public void TestRemoveAsync_SurveyIdIsNull_Throws() { var target = new NfieldTranslationsService(); Assert.Throws<ArgumentNullException>(() => UnwrapAggregateException(target.RemoveAsync(null, 0, new Translation()))); }