Exemplo n.º 1
0
        public DeleteMovieRequestCommandHandlerTests()
        {
            _requestService     = Substitute.For <IMovieRequestService>();
            _unitOfWork         = Substitute.For <IUnitOfWork>();
            _claimsUserAccessor = Substitute.For <IClaimsPrincipalAccessor>();

            _underTest = new DeleteMovieRequestCommandHandler(_requestService, _unitOfWork, _claimsUserAccessor);
        }
Exemplo n.º 2
0
 public GetTvPagedRequestQueryHandler(IMapper mapper,
                                      ITvRequestService requestService,
                                      IClaimsPrincipalAccessor claimsAccessor)
 {
     _mapper         = mapper;
     _requestService = requestService;
     _claimsAccessor = claimsAccessor;
 }
Exemplo n.º 3
0
        public CreateIssueCommandHandlerTests()
        {
            _issueService            = Substitute.For <IIssueService>();
            _plexService             = Substitute.For <IPlexService>();
            _unitOfWork              = Substitute.For <IUnitOfWork>();
            _claimsPrincipalAccessor = Substitute.For <IClaimsPrincipalAccessor>();

            _underTest = new CreateIssueCommandHandler(_issueService, _plexService, _unitOfWork, _claimsPrincipalAccessor);
        }
 public CreateIssueCommentCommandHandler(
     IIssueService issueService,
     IUnitOfWork unitOfWork,
     IClaimsPrincipalAccessor claimsPrincipalAccessor)
 {
     _issueService            = issueService;
     _unitOfWork              = unitOfWork;
     _claimsPrincipalAccessor = claimsPrincipalAccessor;
 }
Exemplo n.º 5
0
 public AuthorizationValidationRule(
     IAuthorizationService authorizationService,
     IClaimsPrincipalAccessor claimsPrincipalAccessor,
     IAuthorizationErrorMessageBuilder messageBuilder)
 {
     _authorizationService    = authorizationService;
     _claimsPrincipalAccessor = claimsPrincipalAccessor;
     _messageBuilder          = messageBuilder;
 }
 public DeleteMovieRequestCommandHandler(
     IMovieRequestService requestService,
     IUnitOfWork unitOfWork,
     IClaimsPrincipalAccessor claimsUserAccessor
     )
 {
     _requestService     = requestService;
     _unitOfWork         = unitOfWork;
     _claimsUserAccessor = claimsUserAccessor;
 }
        public GetMoviePagedRequestQueryHandlerTests()
        {
            var mapperConfig = new MapperConfiguration(opts => { opts.AddProfile(new RequestProfile()); });
            var mapper       = mapperConfig.CreateMapper();

            _requestService = Substitute.For <IMovieRequestService>();
            _claimsAccessor = Substitute.For <IClaimsPrincipalAccessor>();

            _underTest = new GetMoviePagedRequestQueryHandler(mapper, _requestService, _claimsAccessor);
        }
        public CreateMovieRequestCommandHandlerTests()
        {
            _theMovieDbService       = Substitute.For <ITheMovieDbService>();
            _requestService          = Substitute.For <IMovieRequestService>();
            _plexService             = Substitute.For <IPlexService>();
            _unitOfWork              = Substitute.For <IUnitOfWork>();
            _claimsPrincipalAccessor = Substitute.For <IClaimsPrincipalAccessor>();
            var logger = Substitute.For <ILogger <CreateRequestCommandHandler> >();

            _underTest = new CreateRequestCommandHandler(_theMovieDbService, _requestService, _plexService, _unitOfWork, _claimsPrincipalAccessor, logger);
        }
        public DeleteTvRequestCommandHandlerTests()
        {
            _requestService     = Substitute.For <ITvRequestService>();
            _unitOfWork         = Substitute.For <IUnitOfWork>();
            _claimsUserAccessor = Substitute.For <IClaimsPrincipalAccessor>();
            var logger = Substitute.For <ILogger <DeleteTvRequestCommandHandler> >();

            _underTest = new DeleteTvRequestCommandHandler(_requestService, _unitOfWork, _claimsUserAccessor, logger);

            _requestUserId = new Random().Next(1, int.MaxValue);
        }
Exemplo n.º 10
0
 public DeleteTvRequestCommandHandler(
     ITvRequestService requestService,
     IUnitOfWork unitOfWork,
     IClaimsPrincipalAccessor claimsUserAccessor,
     ILogger <DeleteTvRequestCommandHandler> logger
     )
 {
     _requestService     = requestService;
     _unitOfWork         = unitOfWork;
     _claimsUserAccessor = claimsUserAccessor;
     _logger             = logger;
 }
 public CreateTvRequestCommandHandler(
     IMapper mapper,
     ITvRequestService requestService,
     ITheMovieDbService theMovieDbService,
     IUnitOfWork unitOfWork,
     IClaimsPrincipalAccessor claimsPrincipalAccessor)
 {
     _mapper                  = mapper;
     _requestService          = requestService;
     _theMovieDbService       = theMovieDbService;
     _unitOfWork              = unitOfWork;
     _claimsPrincipalAccessor = claimsPrincipalAccessor;
 }
 public CreateRequestCommandHandler(
     ITheMovieDbService theMovieDbService,
     IMovieRequestService requestService,
     IPlexService plexService,
     IUnitOfWork unitOfWork,
     IClaimsPrincipalAccessor claimsPrincipalAccessor,
     ILogger <CreateRequestCommandHandler> logger)
 {
     _theMovieDbService       = theMovieDbService;
     _requestService          = requestService;
     _plexService             = plexService;
     _unitOfWork              = unitOfWork;
     _claimsPrincipalAccessor = claimsPrincipalAccessor;
     _logger = logger;
 }
 /// <summary>
 /// Creates an instance of <see cref="AuthorizationValidationRule"/>.
 /// </summary>
 /// <param name="authorizationService"> ASP.NET Core <see cref="IAuthorizationService"/> to authorize against. </param>
 /// <param name="claimsPrincipalAccessor"> The <see cref="IClaimsPrincipalAccessor"/> which provides the <see cref="ClaimsPrincipal"/> for authorization. </param>
 public AuthorizationValidationRule(IAuthorizationService authorizationService, IClaimsPrincipalAccessor claimsPrincipalAccessor)
 {
     _authorizationService    = authorizationService;
     _claimsPrincipalAccessor = claimsPrincipalAccessor;
 }