public async static Task RemoveUsers()
        {
            var context  = TestAppContext.GetContext();
            var allUsers = context.Users;

            context.Users.RemoveRange(allUsers);
            await context.SaveChangesAsync();
        }
Exemplo n.º 2
0
        public TestAuthController()
        {
            var appSettings = AppSettings.GetAppSettings();

            _context           = TestAppContext.GetContext();
            _userService       = new UserService(_context);
            _authService       = new AuthService(TestAppContext.GetContext(), _userService, appSettings);
            _authController    = new AuthController(_authService);
            _accountController = new AccountController(_userService);
        }
 public TestAccountController()
 {
     _applicationContext = TestAppContext.GetContext();
     _service            = new UserService(_applicationContext);
 }
Exemplo n.º 4
0
 public TestServiceController()
 {
     _context    = TestAppContext.GetContext();
     _service    = new ServiceService(_context);
     _controller = new ServiceController(_service);
 }