public void Setup() { MockClient.Setup(x => x.GetEditVacancyInfoAsync(Vacancy.EmployerAccountId)).ReturnsAsync(EmployerEditVacancyInfo); MockRecruitVacancyClient.Setup(x => x.GetVacancyAsync(Vacancy.Id)).ReturnsAsync(Vacancy); MockRecruitVacancyClient.Setup(x => x.GetEmployerProfileAsync(Vacancy.EmployerAccountId, Vacancy.AccountLegalEntityPublicHashedId)).ReturnsAsync(VacancyEmployerProfile); MockRecruitVacancyClient.Setup(x => x.GetEmployerProfileAsync(Vacancy.EmployerAccountId, AlternateEmployerProfile.AccountLegalEntityPublicHashedId)).ReturnsAsync(AlternateEmployerProfile); MockRecruitVacancyClient.Setup(x => x.Validate(Vacancy, ValidationRules)).Returns(new EntityValidationResult()); MockRecruitVacancyClient.Setup(x => x.UpdateDraftVacancyAsync(It.IsAny <Vacancy>(), User)); MockRecruitVacancyClient.Setup(x => x.UpdateEmployerProfileAsync(It.IsAny <EmployerProfile>(), User)); MockAddressesClient.Setup(x => x.GetAddresses(It.IsAny <string>())).ReturnsAsync(AddressesListResponse); var utility = new Utility(MockRecruitVacancyClient.Object, Mock.Of <IFeature>()); Sut = new LocationOrchestrator(MockClient.Object, MockRecruitVacancyClient.Object, Mock.Of <ILogger <LocationOrchestrator> >(), Mock.Of <IReviewSummaryService>(), MockAddressesClient.Object, utility); }
internal void VerifyAddressesClientCalled() { MockAddressesClient.Verify(x => x.GetAddresses(It.IsAny <string>()), Times.Once); }