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);
        }
示例#2
0
        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);
        }
示例#3
0
 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;
 }
示例#9
0
 public ValidatePostcodeHandler(IPostcodeService postcodeService)
 {
     _postcodeService = postcodeService;
 }
 public GetOutcodeQueryHandler(IPostcodeService service)
 {
     _service = service;
 }
示例#11
0
 public PostcodesController(IPostcodeService postcodeService)
 {
     this.postcodeService = postcodeService;
 }
示例#12
0
 public PostcodeApiController(IPostcodeService postcodeService)
 {
     _postcodeService = postcodeService;
 }
 public GetLocationsQueryHandler(ILocationService locationService, IPostcodeService postcodeService)
 {
     _locationService = locationService;
     _postcodeService = postcodeService;
 }
示例#14
0
        protected async Task FindAndSetPostcodeAsync <T>(IPostcodeService postcodeService, T model) where T : IHasPostcode
        {
            var foundPostcode = await postcodeService.FindPostcodeAsync(model.Postcode);

            model.PostcodeToLookup = foundPostcode?.Postcode;
        }
示例#15
0
 public PostcodeController(IPostcodeService postService)
 {
     this._postService = postService;
 }