SamplingPointsCountAsync() public méthode

See INfieldSurveysService.SamplingPointsCountAsync
public SamplingPointsCountAsync ( string surveyId ) : Task
surveyId string
Résultat Task
        public void TestSamplingPointsCountAsync_ServerReturnsCount_ReturnsNumberOfSamplingPointsForTheSurvey()
        {
            const string surveyId = "123";
            const int samplingPointCount = 5;
            var uri = $@"{ServiceAddress}surveys/{surveyId}/samplingpoints/Count";
            var mockedNfieldConnection = new Mock<INfieldConnectionClient>();
            var mockedHttpClient = CreateHttpClientMock(mockedNfieldConnection);
            mockedHttpClient
                .Setup(client => client.GetAsync(uri))
                .Returns(CreateTask(HttpStatusCode.OK, new StringContent(samplingPointCount.ToString())));
            var target = new NfieldSurveysService();
            target.InitializeNfieldConnection(mockedNfieldConnection.Object);

            var result = target.SamplingPointsCountAsync(surveyId).Result;

            Assert.Equal(samplingPointCount, result);
        }