Exemplo n.º 1
0
        public UserInfoServiceTest()
        {
            // for test create db in memory
            _context = new TestXmlDbContext(new DbContextOptionsBuilder <TestXmlDbContext>()
                                            .UseSqlite("Filename=:memory:")
                                            .Options);
            _context.Database.OpenConnection();
            _context.Database.EnsureCreated();

            _userService = new UserInfoService(_context);
        }
Exemplo n.º 2
0
 public UserInfoService(TestXmlDbContext dbContext)
 {
     _dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
 }