public HolidayTests(ITestOutputHelper output) { _output = output; var setup = new SetUp(); setup.Initialize(); _context = setup.HolidayDbContext; var mapper = setup.Mapper; var userManager = setup.InitializeUserManager(); _holidaysCount = setup.GetCount("holidays"); _configuration = setup.GetConfiguration(); _timeService = new TimeService(); var mockUserService = new Mock <IUserService>().Object; var mockOvertimeUtility = new Mock <IOvertimeUtility>().Object; _holidaysRepository = new HolidaysRepository(_context); _employeesRepository = new EmployeesRepository(_context, userManager); _clientsRepository = new ClientsRepository(_context); var holidayGuidsRepository = new HolidayGuidsRepository(_context); var mockNotificationSettingsService = new Mock <INotificationSettingsService>().Object; _employeesService = new EmployeesService(_employeesRepository, mapper, mockOvertimeUtility, _timeService, mockUserService, mockNotificationSettingsService, _configuration); _holidaysService = new HolidaysService(_holidaysRepository, _employeesRepository, mapper, _timeService, mockOvertimeUtility, _clientsRepository, mockUserService, _configuration, holidayGuidsRepository); }
public InventoryUpdaterTests() { var setup = new SetUp(); setup.Initialize(); var context = setup.HolidayDbContext; _inventoryItemRepository = new InventoryItemsRepository(context); _inventoryCategoryRepository = new InventoryCategoryRepository(context); _timeService = new TimeService(); var _logger = new Mock <ILogger <BackgroundInventoryUpdater> >().Object; _backgroundInventoryUpdater = new BackgroundInventoryUpdater(_inventoryItemRepository, _inventoryCategoryRepository, _timeService, _logger); }
public FileServiceTests() { var setup = new SetUp(); setup.Initialize(); _context = setup.HolidayDbContext; _configuration = setup.GetConfiguration(); _azureStorageServiceMock = new Mock <IAzureStorageService>(); ConfigureAzureStorageServiceMock(); var timeServiceMock = new Mock <ITimeService>(); timeServiceMock .Setup(s => s.GetCurrentTime()) .Returns(new DateTime(2020, 7, 9, 6, 0, 0)) ; _fileService = new FileService( new FileRepository(_context), _configuration, timeServiceMock.Object, _azureStorageServiceMock.Object ); }