Example #1
0
 public HomeController(IMemoryCache cache, IHostingEnvironment env)
 {
     _cache = cache;
     _publicationManager = new PublicationManager(Core.Settings.Current.ConnectionString, cache);
     _vacancyManager     = new VacancyManager(Core.Settings.Current.ConnectionString, cache);
     _env = env;
 }
Example #2
0
 public ApiController(IMemoryCache cache)
 {
     _publicationManager  = new PublicationManager(Settings.Current.ConnectionString, cache);
     _userManager         = new UserManager(Settings.Current.ConnectionString);
     _vacancyManager      = new VacancyManager(Settings.Current.ConnectionString, cache);
     _crossPostManager    = new CrossPostManager(Settings.Current.ConnectionString);
     _localizationManager = new LocalizationManager(Settings.Current.ConnectionString, cache);
 }
Example #3
0
        public void TestEmptyVacancies()
        {
            var optionsBuilder = new DbContextOptionsBuilder <HomeMyDayDbContext>();

            optionsBuilder.UseInMemoryDatabase(Guid.NewGuid().ToString());
            HomeMyDayDbContext context    = new HomeMyDayDbContext(optionsBuilder.Options);
            IVacancyRepository repository = new EFVacancyRepository(context);
            IVacancyManager    manager    = new VacancyManager(repository);

            VacancyController target = new VacancyController(manager);

            var result = target.Index() as ViewResult;
            var model  = result.Model as Vacancy;

            Assert.Null(model);
        }
Example #4
0
 public SitemapController(IMemoryCache cache)
 {
     _cache = cache;
     _publicationManager = new PublicationManager(Core.Settings.Current.ConnectionString, cache);
     _vacancyManager     = new VacancyManager(Core.Settings.Current.ConnectionString, cache);
 }