public async Task Create_IdReturned() { IDbEntityRepository <SoftwareStatementProfile>?repo = Substitute.For <IDbEntityRepository <SoftwareStatementProfile> >(); ISoftwareStatementProfileService?service = Substitute.For <ISoftwareStatementProfileService>(); IDbMultiEntityMethods? dbMethods = Substitute.For <IDbMultiEntityMethods>(); IEntityMapper?mapper = Substitute.For <IEntityMapper>(); SoftwareStatementProfile?resultProfile = new SoftwareStatementProfile(); mapper.Map <SoftwareStatementProfile>(Arg.Any <Models.Public.Request.SoftwareStatementProfile>()) .Returns(resultProfile); CreateSoftwareStatementProfile?interaction = new CreateSoftwareStatementProfile(softwareStatementProfileService: service); Models.Public.Request.SoftwareStatementProfile?profile = new Models.Public.Request.SoftwareStatementProfile { DefaultFragmentRedirectUrl = "http://test.com", SigningKey = "a", SigningKeyId = "b", SigningCertificate = "e30=", TransportKey = "a", TransportCertificate = "a", SoftwareStatement = "e30=.e30=.e30=" }; SoftwareStatementProfileResponse?result = await interaction.CreateAsync(profile); result.Should().NotBeNull(); }
internal SharedContext( ICertificateReader certificateReader, IApiClient apiClient, IObcConfigurationProvider configurationProvider, IInstrumentationClient instrumentation, IKeySecretReadOnlyProvider keySecretReadOnlyProvider, IDbEntityRepository <BankClientProfile> clientProfileRepository, ISoftwareStatementProfileService softwareStatementProfileService, IDbEntityRepository <DomesticConsent> domesticConsentRepository, IEntityMapper entityMapper, IDbEntityRepository <ApiProfile> apiProfileRepository, IDbMultiEntityMethods dbContextService, IKeySecretWriteRepository <ActiveSoftwareStatementProfiles> activeSrRepo, IKeySecretMultiItemReadRepository <SoftwareStatementProfile> sReadOnlyRepo, IKeySecretMultiItemWriteRepository <SoftwareStatementProfile> sRepo, IKeySecretReadRepository <ActiveSoftwareStatementProfiles> activeSReadOnlyRepo) { CertificateReader = certificateReader; ApiClient = apiClient; ConfigurationProvider = configurationProvider; Instrumentation = instrumentation; KeySecretReadOnlyProvider = keySecretReadOnlyProvider; ClientProfileRepository = clientProfileRepository; SoftwareStatementProfileService = softwareStatementProfileService; DomesticConsentRepository = domesticConsentRepository; EntityMapper = entityMapper; ApiProfileRepository = apiProfileRepository; DbContextService = dbContextService; ActiveSRRepo = activeSrRepo; SReadOnlyRepo = sReadOnlyRepo; SRepo = sRepo; ActiveSReadOnlyRepo = activeSReadOnlyRepo; }
internal RequestBuilder( ITimeProvider timeProvider, IEntityMapper entityMapper, IDbMultiEntityMethods dbContextService, IObcConfigurationProvider configurationProvider, IInstrumentationClient logger, IKeySecretReadOnlyProvider keySecretReadOnlyProvider, IApiClient apiClient, ICertificateReader certificateReader, IDbEntityRepository <BankClientProfile> clientProfileRepository, IDbEntityRepository <DomesticConsent> domesticConsentRepo, IDbEntityRepository <ApiProfile> apiProfileRepository, IKeySecretReadRepository <ActiveSoftwareStatementProfiles> activeSReadOnlyRepo, IKeySecretWriteRepository <ActiveSoftwareStatementProfiles> activeSrRepo, IKeySecretMultiItemReadRepository <SoftwareStatementProfile> sReadOnlyRepo, IKeySecretMultiItemWriteRepository <SoftwareStatementProfile> sRepo, ISoftwareStatementProfileService softwareStatementProfileService) { _certificateReader = certificateReader.ArgNotNull(nameof(certificateReader)); _timeProvider = timeProvider.ArgNotNull(nameof(timeProvider)); _entityMapper = entityMapper.ArgNotNull(nameof(entityMapper)); _dbContextService = dbContextService; _activeSReadOnlyRepo = activeSReadOnlyRepo; _activeSRRepo = activeSrRepo; _sReadOnlyRepo = sReadOnlyRepo; _sRepo = sRepo; _softwareStatementProfileService = softwareStatementProfileService; _configurationProvider = configurationProvider.ArgNotNull(nameof(configurationProvider)); _logger = logger.ArgNotNull(nameof(logger)); _keySecretReadOnlyProvider = keySecretReadOnlyProvider.ArgNotNull(nameof(keySecretReadOnlyProvider)); _apiClient = apiClient.ArgNotNull(nameof(apiClient)); _clientProfileRepository = clientProfileRepository.ArgNotNull(nameof(clientProfileRepository)); _domesticConsentRepo = domesticConsentRepo.ArgNotNull(nameof(domesticConsentRepo)); _apiProfileRepository = apiProfileRepository.ArgNotNull(nameof(apiProfileRepository)); }
public RequestBuilder( IEntityMapper entityMapper, IDbMultiEntityMethods dbContextService, IObcConfigurationProvider configurationProvider, IInstrumentationClient logger, IKeySecretReadOnlyProvider keySecretReadOnlyProvider, IApiClient apiClient, ICertificateReader certificateReader, IDbEntityRepository <BankClientProfile> clientProfileRepository, IDbEntityRepository <DomesticConsent> domesticConsentRepo, IDbEntityRepository <ApiProfile> apiProfileRepository, IKeySecretReadRepository <ActiveSoftwareStatementProfiles> activeSReadOnlyRepo, IKeySecretWriteRepository <ActiveSoftwareStatementProfiles> activeSrRepo, IKeySecretMultiItemReadRepository <SoftwareStatementProfile> sReadOnlyRepo, IKeySecretMultiItemWriteRepository <SoftwareStatementProfile> sRepo, ISoftwareStatementProfileService softwareStatementProfileService) : this( timeProvider : new TimeProvider(), entityMapper : entityMapper, dbContextService : dbContextService, configurationProvider : configurationProvider, logger : logger, keySecretReadOnlyProvider : keySecretReadOnlyProvider, apiClient : apiClient, certificateReader : certificateReader, clientProfileRepository : clientProfileRepository, domesticConsentRepo : domesticConsentRepo, apiProfileRepository : apiProfileRepository, activeSReadOnlyRepo : activeSReadOnlyRepo, activeSrRepo : activeSrRepo, sReadOnlyRepo : sReadOnlyRepo, sRepo : sRepo, softwareStatementProfileService : softwareStatementProfileService) { }
public CreatePaymentInitiationApiProfile( IDbMultiEntityMethods dbContextService, IDbEntityRepository <ApiProfile> apiProfileRepo) { _dbContextService = dbContextService; _apiProfileRepo = apiProfileRepo; }
public CreateBankClientProfile( IApiClient apiClient, IEntityMapper mapper, IDbMultiEntityMethods dbMultiEntityMethods, IDbEntityRepository <BankClientProfile> bankClientProfileRepo, ISoftwareStatementProfileService softwareStatementProfileService) { _apiClient = apiClient; _mapper = mapper; _dbMultiEntityMethods = dbMultiEntityMethods; _bankClientProfileRepo = bankClientProfileRepo; _softwareStatementProfileService = softwareStatementProfileService; }
public CreateDomesticPayment( IApiClient apiClient, IEntityMapper mapper, IDbEntityRepository <BankClientProfile> openBankingClientRepo, IDbEntityRepository <DomesticConsent> domesticConsentRepo, IDbEntityRepository <ApiProfile> apiProfileRepo, ISoftwareStatementProfileService softwareStatementProfileService) { _apiClient = apiClient; _mapper = mapper; _openBankingClientRepo = openBankingClientRepo; _domesticConsentRepo = domesticConsentRepo; _apiProfileRepo = apiProfileRepo; _softwareStatementProfileService = softwareStatementProfileService; }
public CreateDomesticPaymentConsent( IApiClient apiClient, IEntityMapper mapper, IDbMultiEntityMethods dbMultiEntityMethods, IDbEntityRepository <BankClientProfile> bankClientProfileRepo, IDbEntityRepository <ApiProfile> apiProfileRepo, IDbEntityRepository <DomesticConsent> domesticConsentRepo, ISoftwareStatementProfileService softwareStatementProfileService) { _apiClient = apiClient; _mapper = mapper; _dbMultiEntityMethods = dbMultiEntityMethods; _bankClientProfileRepo = bankClientProfileRepo; _apiProfileRepo = apiProfileRepo; _domesticConsentRepo = domesticConsentRepo; _softwareStatementProfileService = softwareStatementProfileService; }
public RedirectCallbackHandler( IApiClient apiClient, IEntityMapper mapper, IDbEntityRepository <BankClientProfile> openBankingClientRepo, IDbEntityRepository <DomesticConsent> domesticConsentRepo, ISoftwareStatementProfileService softwareStatementProfileService, IDbMultiEntityMethods dbMultiEntityMethods, IDbEntityRepository <ApiProfile> apiProfileRepo) { _apiClient = apiClient.ArgNotNull(nameof(apiClient)); _mapper = mapper.ArgNotNull(nameof(mapper)); _openBankingClientRepo = openBankingClientRepo.ArgNotNull(nameof(openBankingClientRepo)); _domesticConsentRepo = domesticConsentRepo.ArgNotNull(nameof(domesticConsentRepo)); _softwareStatementProfileService = softwareStatementProfileService; _dbContextService = dbMultiEntityMethods; _apiProfileRepo = apiProfileRepo; }
public BankClientProfileDbRepoTests(ITestOutputHelper output) { _repo = new DbEntityRepository <BankClientProfile>(_dB); _dbMultiEntityMethods = new DbMultiEntityMethods(_dB); _output = output; }
public DomesticConsentRepoTests(ITestOutputHelper output) { _repo = new DbEntityRepository <DomesticConsent>(_dB); _dbMultiEntityMethods = new DbMultiEntityMethods(_dB); _output = output; }