Nfield.Services.NfieldSurveysServiceTests.TestSamplingPointRemoveAsync_ServerRemovedSamplingPoint_DoesNotThrow C# (CSharp) Method

TestSamplingPointRemoveAsync_ServerRemovedSamplingPoint_DoesNotThrow() private method

        public void TestSamplingPointRemoveAsync_ServerRemovedSamplingPoint_DoesNotThrow()
        {
            const string samplingPointId = "SamplingPointId";
            const string surveyId = "SurveyId";
            var samplingPoint = new SamplingPoint
            {
                SamplingPointId = samplingPointId
            };
            var mockedNfieldConnection = new Mock<INfieldConnectionClient>();
            var mockedHttpClient = CreateHttpClientMock(mockedNfieldConnection);
            mockedHttpClient
                .Setup(client => client.DeleteAsync(string.Format("{0}surveys/{1}/samplingpoints/{2}", ServiceAddress, surveyId,
                                samplingPointId)))
                .Returns(CreateTask(HttpStatusCode.OK));

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

            Assert.DoesNotThrow(() => target.SamplingPointDeleteAsync(surveyId, samplingPoint).Wait());
        }
NfieldSurveysServiceTests