Ejemplo n.º 1
0
        public UserServiceTest()
        {
            _passwordHash                  = A.Fake <IPasswordHashService>();
            _userRepositoryService         = A.Fake <IUserRepositoryService>();
            _jwtService                    = A.Fake <IJsonWebTokenService>();
            _httpRequestParser             = A.Fake <IHttpRequestParser>();
            _emailService                  = A.Fake <IEmailService>();
            _factorAuthenticatorManager    = A.Fake <ITwoFactorAuthenticatorManager>();
            _loginAttemptRepoService       = A.Fake <ILoginAttemptsRepositoryService>();
            _refreshTokenRepositoryService = A.Fake <IRefreshTokenRepositoryService>();
            _whiteListRepostirotyService   = A.Fake <IWhitelistedIpRepositoryService>();

            _userService = new UserService
                           (
                _userRepositoryService,
                _passwordHash,
                _jwtService,
                _httpRequestParser,
                _emailService,
                _factorAuthenticatorManager,
                _whiteListRepostirotyService,
                _loginAttemptRepoService,
                _refreshTokenRepositoryService
                           );
        }
Ejemplo n.º 2
0
 public UserService
 (
     IUserRepositoryService userRepositoryService,
     IPasswordHashService passwordHashService,
     IJsonWebTokenService jwtService,
     IHttpRequestParser httpRequestParser,
     IEmailService emailService,
     ITwoFactorAuthenticatorManager factorAuthenticatorManager,
     IWhitelistedIpRepositoryService whitelistedIpRepositoryService,
     ILoginAttemptsRepositoryService loginAttemptsRepositoryService,
     IRefreshTokenRepositoryService refreshTokenRepositoryService
 )
 {
     _userRepositoryService          = userRepositoryService;
     _passwordHashService            = passwordHashService;
     _jwtService                     = jwtService;
     _httpRequestParser              = httpRequestParser;
     _emailService                   = emailService;
     _factorAuthenticatorManager     = factorAuthenticatorManager;
     _whitelistedIpRepositoryService = whitelistedIpRepositoryService;
     _loginAttemptsRepositoryService = loginAttemptsRepositoryService;
     _refreshTokenRepositoryService  = refreshTokenRepositoryService;
 }