public ApprenticeshipVacancyApiTests() { fakeLogger = A.Fake <ILogger <ApprenticeshipVacancyApi> >(); auditService = A.Fake <IAuditService>(); aVAPIServiceSettings = new AVAPIServiceSettings() { FAAMaxPagesToTryPerMapping = 100, FAAEndPoint = "https://doesnotgoanywhere.com", RequestTimeOutSeconds = 10 }; }
public AVAPIServiceHealthStatusCheckTests() { fakeLogger = A.Fake <ILogger <AVAPIService> >(); aVAPIServiceSettings = new AVAPIServiceSettings() { FAAMaxPagesToTryPerMapping = 100 }; fakeApprenticeshipVacancyApi = A.Fake <IApprenticeshipVacancyApi>(); aVAPIServiceSettings.StandardsForHealthCheck = A.Dummy <string>(); dummyHealthCheckContext = A.Dummy <HealthCheckContext>(); }
public ApprenticeshipVacancyApi(ILogger <ApprenticeshipVacancyApi> logger, IAuditService auditService, AVAPIServiceSettings aVAPIServiceSettings, HttpClient httpClient) { this.logger = logger; this.auditService = auditService; this.aVAPIServiceSettings = aVAPIServiceSettings ?? throw new ArgumentNullException(nameof(aVAPIServiceSettings)); this.httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient)); this.httpClient.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", aVAPIServiceSettings.FAASubscriptionKey); this.httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); this.httpClient.Timeout = TimeSpan.FromSeconds(aVAPIServiceSettings.RequestTimeOutSeconds); correlationId = Guid.NewGuid(); }
public AVAPIServiceTests() { fakeLogger = A.Fake <ILogger <AVAPIService> >(); aVAPIServiceSettings = new AVAPIServiceSettings() { FAAMaxPagesToTryPerMapping = 100 }; fakeApprenticeshipVacancyApi = A.Fake <IApprenticeshipVacancyApi>(); aVMapping = new AVMapping { Standards = new string[] { "225" }, Frameworks = new string[] { "512" }, }; }
public AVAPIService(IApprenticeshipVacancyApi apprenticeshipVacancyApi, ILogger <AVAPIService> logger, AVAPIServiceSettings aVAPIServiceSettings) { this.apprenticeshipVacancyApi = apprenticeshipVacancyApi; this.logger = logger; this.aVAPIServiceSettings = aVAPIServiceSettings; }