Ejemplo n.º 1
0
 public AuthenticationService(IConfiguration config, TechCafeDbContext dbContext, IMapper mapper, IPasswordHasher <User> passwordHasher)
 {
     this.config         = config;
     this.dbContext      = dbContext;
     this.mapper         = mapper;
     this.passwordHasher = passwordHasher;
 }
Ejemplo n.º 2
0
        public AuthenticationServiceTest()
        {
            config         = A.Fake <IConfiguration>();
            passwordHasher = new PasswordHasher <User>();
            mapper         = Mapper.Instance;

            var options = new DbContextOptionsBuilder <TechCafeDbContext>().UseInMemoryDatabase(databaseName: "TestDb").Options;

            dbContext = new TechCafeDbContext(options);
        }