Exemple #1
0
 public AccountService(UserManager <AppIdentityUser> userManager,
                       ILogger <AccountService> logger,
                       IGPUserService gpUserSrv)
 {
     _userManager = userManager;
     _logger      = logger;
     _gpUserSrv   = gpUserSrv;
 }
Exemple #2
0
        public void BeforeEach()
        {
            _services    = new DataBaseDiBootstrapperInMemory().GetServiceProviderWithSeedDb();
            _userManager = _services.GetRequiredService <UserManager <AppIdentityUser> >();
            _logger      = _services.GetRequiredService <ILogger <AccountService> >();
            _gpUserSrv   = _services.GetRequiredService <IGPUserService>();
            _gpUserRepo  = _services.GetRequiredService <IRepository <GeoPingUser> >();
            _accountSrv  = new AccountService(_userManager,
                                              _logger,
                                              _gpUserSrv);

            _identityId = _userManager.FindByNameAsync("testadmin").Result.Id;
            _gpUserId   = _gpUserRepo.Data.FirstOrDefault(x => x.IdentityId == _identityId).Id;
        }