public void Setup() { _kinlyApiClientMock = new Mock <IKinlyApiClient>(); _loggerMock = new Mock <ILogger <KinlyPlatformService> >(); _kinlySelfTestHttpClient = new Mock <IKinlySelfTestHttpClient>(); _pollyRetryService = new Mock <IPollyRetryService>(); _kinlyConfigOptions = Options.Create(new KinlyConfiguration() { CallbackUri = "CallbackUri", KinlyApiUrl = "KinlyApiUrl" }); _kinlyPlatformService = new KinlyPlatformService( _kinlyApiClientMock.Object, _kinlyConfigOptions, _loggerMock.Object, _kinlySelfTestHttpClient.Object, _pollyRetryService.Object ); _testConference = new ConferenceBuilder() .WithParticipant(UserRole.Judge, null) .WithParticipant(UserRole.Individual, "Applicant") .WithParticipant(UserRole.Representative, "Applicant", "*****@*****.**") .WithParticipant(UserRole.Individual, "Respondent") .WithParticipant(UserRole.Representative, "Respondent") .WithEndpoint("Endpoint With DA", $"{Guid.NewGuid():N}@hmcts.net", "*****@*****.**") .WithEndpoint("Endpoint Without DA", $"{Guid.NewGuid():N}@hmcts.net") .Build(); }
public void Setup() { _kinlyApiClientMock = new Mock <IKinlyApiClient>(); _loggerMock = new Mock <ILogger <KinlyPlatformService> >(); _loggerRoomReservationMock = new Mock <ILogger <IRoomReservationService> >(); _memoryCache = new MemoryCache(new MemoryCacheOptions()); _roomReservationService = new RoomReservationService(_memoryCache, _loggerRoomReservationMock.Object); _kinlySelfTestHttpClient = new Mock <IKinlySelfTestHttpClient>(); _pollyRetryService = new Mock <IPollyRetryService>(); _servicesConfigOptions = Options.Create(new ServicesConfiguration { CallbackUri = "CallbackUri", KinlyApiUrl = "KinlyApiUrl" }); _kinlyPlatformService = new KinlyPlatformService( _kinlyApiClientMock.Object, _servicesConfigOptions, _loggerMock.Object, _roomReservationService, _kinlySelfTestHttpClient.Object, _pollyRetryService.Object ); _testConference = new ConferenceBuilder() .WithParticipant(UserRole.Judge, null) .WithParticipant(UserRole.Individual, "Claimant") .WithParticipant(UserRole.Representative, "Claimant", "*****@*****.**") .WithParticipant(UserRole.Individual, "Defendant") .WithParticipant(UserRole.Representative, "Defendant") .WithEndpoint("Endpoint With DA", $"{Guid.NewGuid():N}@test.hearings.com", "*****@*****.**") .WithEndpoint("Endpoint Without DA", $"{Guid.NewGuid():N}@test.hearings.com") .Build(); }
private static IKinlyPlatformService BuildKinlyPlatformService(HttpClient httpClient, ICustomJwtTokenProvider customJwtTokenProvider, ServiceSettings serviceSettings) { var service = new KinlyPlatformService(httpClient, customJwtTokenProvider, serviceSettings.KinlySelfTestScoreEndpointUrl); return(service); }
public KinlyPlatformServiceTest() { _fakeHttpHandler = new FakeHttpMessageHandler(); _kinlySelfTestScoreEndpointUrl = "https://someUrl.com"; _kinlyPlatformService = new KinlyPlatformService ( new HttpClient(_fakeHttpHandler) { Timeout = TimeSpan.FromSeconds(1) }, new Mock <ICustomJwtTokenProvider>().Object, _kinlySelfTestScoreEndpointUrl ); }