public void TestRemoveAsync_ServerRemovedSurvey_DoesNotThrow()
        {
            const string surveyId = "Survey X";
            var          survey   = new Survey(SurveyType.Basic)
            {
                SurveyId = surveyId
            };
            var mockedNfieldConnection = new Mock <INfieldConnectionClient>();
            var mockedHttpClient       = CreateHttpClientMock(mockedNfieldConnection);

            mockedHttpClient
            .Setup(client => client.DeleteAsync(ServiceAddress + "surveys/" + surveyId))
            .Returns(CreateTask(HttpStatusCode.OK));

            var target = new NfieldSurveysService();

            target.InitializeNfieldConnection(mockedNfieldConnection.Object);

            Assert.DoesNotThrow(() => target.RemoveAsync(survey).Wait());
        }
        public void TestAddAsync_SurveyIsNull_ThrowsArgumentNullException()
        {
            var target = new NfieldSurveysService();

            Assert.Throws <ArgumentNullException>(() => UnwrapAggregateException(target.RemoveAsync(null)));
        }