Ejemplo n.º 1
0
 public CategoryRepositoryTest(Bootstrap bootstrap) : base(bootstrap)
 {
     _categoryRepository = _scope.ServiceProvider.GetService <ICategoryRepository>();
     _questionRepository = _scope.ServiceProvider.GetService <IQuestionRepository>();
     _userManager        = _scope.ServiceProvider.GetService <UserManager <ApplicationUser> >();
     _stringConstants    = _scope.ServiceProvider.GetService <IStringConstants>();
     ClearDatabase.ClearDatabaseAndSeed(_trappistDbContext);
 }
Ejemplo n.º 2
0
 public QuestionsRepositoryTest(Bootstrap bootstrap) : base(bootstrap)
 {
     //resolve dependency to be used in tests
     _questionRepository = _scope.ServiceProvider.GetService <IQuestionRepository>();
     _categoryRepository = _scope.ServiceProvider.GetService <ICategoryRepository>();
     _userManager        = _scope.ServiceProvider.GetService <UserManager <ApplicationUser> >();
     _testRepository     = _scope.ServiceProvider.GetService <ITestsRepository>();
     ClearDatabase.ClearDatabaseAndSeed(_trappistDbContext);
 }