public DisplayConsentActionFixture(ITestOutputHelper outputHelper) { _scopeRepositoryFake = new Mock <IScopeRepository>(); _clientRepositoryFake = new Mock <IClientStore>(); _consentRepository = new Mock <IConsentRepository>(); _displayConsentAction = new DisplayConsentAction( _scopeRepositoryFake.Object, _clientRepositoryFake.Object, _consentRepository.Object, new Mock <IAuthorizationCodeStore>().Object, new Mock <ITokenStore>().Object, new InMemoryJwksRepository(), new Mock <IEventPublisher>().Object, new TestOutputLogger("test", outputHelper)); }
/// <summary> /// Initializes a new instance of the <see cref="ConsentController"/> class. /// </summary> /// <param name="scopeRepository">The scope repository.</param> /// <param name="clientStore">The client store.</param> /// <param name="consentRepository">The consent repository.</param> /// <param name="dataProtectionProvider">The data protection provider.</param> /// <param name="eventPublisher">The event publisher.</param> /// <param name="tokenStore">The token store.</param> /// <param name="jwksStore">The JWKS store.</param> /// <param name="authorizationCodeStore">The authorization code store.</param> /// <param name="authenticationService">The authentication service.</param> /// <param name="logger">The controller logger.</param> public ConsentController( IScopeRepository scopeRepository, IClientStore clientStore, IConsentRepository consentRepository, IDataProtectionProvider dataProtectionProvider, IEventPublisher eventPublisher, ITokenStore tokenStore, IJwksStore jwksStore, IAuthorizationCodeStore authorizationCodeStore, IAuthenticationService authenticationService, ILogger <ConsentController> logger) : base(authenticationService) { _dataProtector = dataProtectionProvider.CreateProtector("Request"); _clientStore = clientStore; _eventPublisher = eventPublisher; _logger = logger; _displayConsent = new DisplayConsentAction( scopeRepository, clientStore, consentRepository, authorizationCodeStore, tokenStore, jwksStore, eventPublisher, logger); _confirmConsent = new ConfirmConsentAction( authorizationCodeStore, tokenStore, consentRepository, clientStore, scopeRepository, jwksStore, eventPublisher, logger); }