public override void Given() { var registrationLearnerDetails = new RegisteredLearnerDetails { ProfileId = 1, Uln = 9875641231, Firstname = "Test First 1", Lastname = "Test Last 1", DateofBirth = DateTime.UtcNow.AddYears(-40) }; _registrationLearnerDetails = new List <RegisteredLearnerDetails> { registrationLearnerDetails }; LearnerRecordService.GetPendingGenderLearnersAsync().Returns(_registrationLearnerDetails); _apiResponse = new findLearnerByULNResponse { FindLearnerResponse = new FindLearnerResp { ULN = registrationLearnerDetails.Uln.ToString() } }; LearnerServiceApiClient.FetchLearnerDetailsAsync(Arg.Any <RegisteredLearnerDetails>()).Returns(_apiResponse); _expectedResult = new LearnerGenderResponse { IsSuccess = true, TotalCount = 1, LrsCount = 1, ModifiedCount = 1, SavedCount = 1 }; LearnerRecordService.ProcessLearnerGenderAsync(Arg.Any <List <LearnerRecordDetails> >()).Returns(_expectedResult); }
public override void Given() { _apiResponse = null; _registrationLearnerDetails = new List <RegisteredLearnerDetails>(); LearnerRecordService.GetPendingGenderLearnersAsync().Returns(_registrationLearnerDetails); LearnerServiceApiClient.FetchLearnerDetailsAsync(Arg.Any <RegisteredLearnerDetails>()).Returns(_apiResponse); _expectedResult = new LearnerGenderResponse { IsSuccess = true, TotalCount = 0, LrsCount = 0, ModifiedCount = 0, SavedCount = 0 }; LearnerRecordService.ProcessLearnerGenderAsync(Arg.Any <List <LearnerRecordDetails> >()).Returns(_expectedResult); }