Exemplo n.º 1
0
 public PartiesQueryService(
     IShareSettings settings,
     ITokenResponseClient client,
     IJwtTokenParser jwtTokenParser,
     ISchemeOwnerJwtTokenResponseValidator tokenResponseValidator)
 {
     _requestUri             = $"{settings.SchemeOwnerUrl}/{Constants.SchemeOwnerPartiesEndpoint}";
     _client                 = client;
     _tokenResponseValidator = tokenResponseValidator;
     _jwtTokenParser         = jwtTokenParser;
 }
Exemplo n.º 2
0
 public CapabilitiesQueryService(
     ITokenResponseClient client,
     IJwtTokenParser jwtTokenParser,
     IJwtTokenResponseValidator tokenResponseValidator,
     IShareSettings settings)
 {
     _client                 = client;
     _jwtTokenParser         = jwtTokenParser;
     _tokenResponseValidator = tokenResponseValidator;
     _eori = settings.Eori;
 }
Exemplo n.º 3
0
 public ShareBusinessLogic(IDynamicQueries dynamicQueries, ICosmosDbSettings cosmosDbSettings,
                           IBackendDatabaseService backendDatabaseService, IShareSettings shareSettings,
                           IUserProfileBusinessLogic userProfileBusinessLogic, IPersonalizedPlanBusinessLogic personalizedPlanBusinessLogic)
 {
     dbClient           = dynamicQueries;
     dbSettings         = cosmosDbSettings;
     dbService          = backendDatabaseService;
     dbShareSettings    = shareSettings;
     dbUserProfile      = userProfileBusinessLogic;
     dbPersonalizedPlan = personalizedPlanBusinessLogic;
 }
 public SchemeOwnerJwtTokenResponseValidator(
     IDecodedJwtValidator decodedJwtValidator,
     IRootCertificateStorage rootCertificateStorage,
     ILogger <SchemeOwnerJwtTokenResponseValidator> logger,
     ITestCaStrategy testCaStrategy,
     IShareSettings settings)
 {
     _decodedJwtValidator    = decodedJwtValidator;
     _rootCertificateStorage = rootCertificateStorage;
     _logger         = logger;
     _testCaStrategy = testCaStrategy;
     _partyId        = settings.Eori;
 }
        public ShareBuisnessLogicTests()
        {
            dbService                     = Substitute.For <IBackendDatabaseService>();
            dbSettings                    = Substitute.For <ICosmosDbSettings>();
            dynamicQueries                = Substitute.For <IDynamicQueries>();
            dbShareSettings               = Substitute.For <IShareSettings>();
            userProfileBusinessLogic      = Substitute.For <IUserProfileBusinessLogic>();
            personalizedPlanBusinessLogic = Substitute.For <IPersonalizedPlanBusinessLogic>();
            shareBusinessLogic            = new ShareBusinessLogic(dynamicQueries, dbSettings, dbService, dbShareSettings, userProfileBusinessLogic, personalizedPlanBusinessLogic);

            dbSettings.ProfilesCollectionId.Returns("UserProfile");
            dbSettings.UserResourcesCollectionId.Returns("UserResource");
            dbShareSettings.PermaLinkMaxLength.Returns(7);
        }
        public SchemeOwnerJwtTokenResponseValidatorTests()
        {
            var testCaStrategy         = new TestCaStrategy();
            var rootCertificateStorage = new TestEnvironmentRootCertificateStorage();

            _decodedJwtValidatorMock = new Mock <IDecodedJwtValidator>();
            _settings   = new DefaultSettings(ConfigurationBuilder.Build());
            _loggerMock = new Mock <ILogger <SchemeOwnerJwtTokenResponseValidator> >();

            _sut = new SchemeOwnerJwtTokenResponseValidator(
                _decodedJwtValidatorMock.Object,
                rootCertificateStorage,
                _loggerMock.Object,
                testCaStrategy,
                _settings);
        }