public FarmDataToFarmService(IPostcodeService postcodeService, IHttpClientFactory httpClientFactory, IGeohashService geohashService, ILogger <FarmDataToFarmService> logger) { PostcodeService = postcodeService; GeohashService = geohashService; Logger = logger; HttpClient = httpClientFactory.CreateClient(); HttpClient.DefaultRequestHeaders.UserAgent.TryParseAdd(GetType().Namespace); }
public void Index() { IPostcodeService service = Mock.Of <IPostcodeService>(); IEnumerable <IPostcode> expectedPostcodes = new List <IPostcode>(); Mock.Get(service).Setup(p => p.Get()).Returns(expectedPostcodes); PostcodeController controller = new PostcodeController(service); ViewResult result = controller.Index() as ViewResult; Assert.IsNotNull(result); }
public GroupedProviderSearchHandler( IValidator <GroupedProviderSearchQuery> validator, IProviderSearchService searchService, IPaginationSettings paginationSettings, IPostcodeService postcodeIoService, ILog logger) { _validator = validator; _searchService = searchService; _paginationSettings = paginationSettings; _postcodeIoService = postcodeIoService; _logger = logger; }
public PatientDetailsModel( INotificationService service, IAuthorizationService authorizationService, INotificationRepository notificationRepository, IAlertRepository alertRepository, IPostcodeService postcodeService, IReferenceDataRepository referenceDataRepository) : base(service, authorizationService, notificationRepository, alertRepository) { _postcodeService = postcodeService; _referenceDataRepository = referenceDataRepository; CurrentPage = NotificationSubPaths.EditPatientDetails; }
public ClaimApiController( IClaimService claimService, IPostcodeService postcodeService, IOptions <Auth0Config> config, IOptions <AsposeOptions> asposeOptions, IHostingEnvironment env, ViewRender view) { _claimService = claimService; _postcodeService = postcodeService; _view = view; _auth0Config = config.Value; _asposeOptions = asposeOptions.Value; _env = env; }
public NotificationMapper(IMigrationRepository migrationRepository, IReferenceDataRepository referenceDataRepository, IImportLogger logger, IPostcodeService postcodeService) { _migrationRepository = migrationRepository; _referenceDataRepository = referenceDataRepository; _logger = logger; _postcodeService = postcodeService; // This is a database-based value, but static from the runtime point of view, so we fetch it once here. _postMortemOutcomeType = _referenceDataRepository.GetTreatmentOutcomeForTypeAndSubType( TreatmentOutcomeType.Died, TreatmentOutcomeSubType.Unknown).Result; }
public CourseDirectoryController( IConfiguration configuration, ICourseDirectoryService courseDirectoryService, IMemoryCache memoryCache, ITelemetryClient telemetryClient, IOptions <App> appSettings, ICourseDirectory courseDirectory, IFileHelper fileHelper, ICourseDirectoryHelper requestModelHelper, IPostcodeService postcodeService, ICorrelationContextAccessor correlationContextAccessor) { Configuration = configuration; Service = courseDirectoryService; Cache = memoryCache; Telemetry = telemetryClient; Settings = appSettings; CourseDirectory = courseDirectory; Files = fileHelper; CourseDirectoryHelper = requestModelHelper; PostcodeService = postcodeService; CorrelationContextAccessor = correlationContextAccessor; }
public ApplicationRequestToApplicationConverter(ISubmitService submitService, ICountryService countryService, IPostcodeService postcodeService) { this.countryService = countryService; this.postcodeService = postcodeService; }
public ValidatePostcodeHandler(IPostcodeService postcodeService) { _postcodeService = postcodeService; }
public GetOutcodeQueryHandler(IPostcodeService service) { _service = service; }
public PostcodesController(IPostcodeService postcodeService) { this.postcodeService = postcodeService; }
public PostcodeApiController(IPostcodeService postcodeService) { _postcodeService = postcodeService; }
public GetLocationsQueryHandler(ILocationService locationService, IPostcodeService postcodeService) { _locationService = locationService; _postcodeService = postcodeService; }
protected async Task FindAndSetPostcodeAsync <T>(IPostcodeService postcodeService, T model) where T : IHasPostcode { var foundPostcode = await postcodeService.FindPostcodeAsync(model.Postcode); model.PostcodeToLookup = foundPostcode?.Postcode; }
public PostcodeController(IPostcodeService postService) { this._postService = postService; }