QueryAsync() public method

INfieldSurveyResponseCodesService.QueryAsync(string)
public QueryAsync ( string surveyId ) : Task>
surveyId string
return Task>
 public void TestQueryAsync_SurveyIdIsNull_Throws()
 {
     var target = new NfieldSurveyResponseCodesService();
     Assert.Throws<ArgumentNullException>(() => UnwrapAggregateException(target.QueryAsync(null)));
 }
        public void TestQueryAsync_ValidSurveyId_CAllsCorrectUrl()
        {
            // Arrange
            const string surveyId = "surveyId";
            var mockedNfieldConnection = new Mock<INfieldConnectionClient>();
            var mockedHttpClient = CreateHttpClientMock(mockedNfieldConnection);

            var target = new NfieldSurveyResponseCodesService();
            target.InitializeNfieldConnection(mockedNfieldConnection.Object);
            mockedHttpClient.Setup(client => client.GetAsync(It.IsAny<string>()))
                .Returns(CreateTask(HttpStatusCode.OK,
                    new StringContent(JsonConvert.SerializeObject(new List<SurveyResponseCode>()))));

            // Act
            target.QueryAsync(surveyId).Wait();

            // Assert
            mockedHttpClient.Verify(
                hc => hc.GetAsync(It.Is<string>(url => url.EndsWith("Surveys/" + surveyId + "/ResponseCodes/"))), Times.Once());
        }
 public void TestQueryAsyncBasedOnCode_SurveyIdIsEmptyString_Throws()
 {
     var target = new NfieldSurveyResponseCodesService();
     Assert.Throws<ArgumentNullException>(() => UnwrapAggregateException(target.QueryAsync(string.Empty, 20)));
 }