AssignAsync() public method

public AssignAsync ( string surveyId, SamplingPointInterviewerAssignmentsModel model ) : System.Threading.Tasks.Task
surveyId string
model Nfield.Models.SamplingPointInterviewerAssignmentsModel
return System.Threading.Tasks.Task
        public void TestAssignAsync_ServerAcceptsAssign_ReturnsNoError()
        {
            var mockedNfieldConnection = new Mock<INfieldConnectionClient>();
            var mockedHttpClient = CreateHttpClientMock(mockedNfieldConnection);

            mockedHttpClient.Setup(client => client.PostAsync(It.IsAny<string>(), It.IsAny<HttpContent>())).Returns(CreateTask(HttpStatusCode.OK));

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

               target.AssignAsync(SurveyId, SamplingPointId, InterviewerId);

               mockedHttpClient.Verify(hc =>
               hc.PostAsync(
                   It.Is<string>(url => url.EndsWith("Surveys/" + SurveyId + "/SamplingPoints/" + SamplingPointId + "/Assignments/" + InterviewerId)),
                   null),
               Times.Once());
        }
 public void TestAssignAsync_SamplingPointIdIsNull_Throws()
 {
     var target = new NfieldSamplingPointInterviewerAssignmentsService();
     Assert.Throws<ArgumentNullException>(() =>
         UnwrapAggregateException(target.AssignAsync(SurveyId, null, InterviewerId)));
 }