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; }
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); }
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); }
public SitemapController(IMemoryCache cache) { _cache = cache; _publicationManager = new PublicationManager(Core.Settings.Current.ConnectionString, cache); _vacancyManager = new VacancyManager(Core.Settings.Current.ConnectionString, cache); }