AddAsync() public method

See INfieldLanguagesService.AddAsync
public AddAsync ( string surveyId, Language language ) : Task
surveyId string
language Language
return Task
        public void TestAddAsync_ServerAcceptsLanguage_ReturnsLanguage()
        {
            var language = new Language { Name = "Language X" };
            var mockedNfieldConnection = new Mock<INfieldConnectionClient>();
            var mockedHttpClient = CreateHttpClientMock(mockedNfieldConnection);
            var content = new StringContent(JsonConvert.SerializeObject(language));
            mockedHttpClient
                .Setup(client => client.PostAsJsonAsync(ServiceAddress + "Surveys/" + SurveyId + "/Languages", language))
                .Returns(CreateTask(HttpStatusCode.OK, content));

            var target = new NfieldLanguagesService();
            target.InitializeNfieldConnection(mockedNfieldConnection.Object);

            var actual = target.AddAsync(SurveyId, language).Result;

            Assert.Equal(language.Name, actual.Name);
        }
 public void TestAddAsync_SurveyIdIsNull_Throws()
 {
     var target = new NfieldLanguagesService();
     Assert.Throws<ArgumentNullException>(() => UnwrapAggregateException(target.AddAsync(null, new Language())));
 }