private CacheService CreateCacheService(TolkDbContext dbContext) { IDistributedCache cache = Mock.Of <IDistributedCache>(); TolkBaseOptionsService optionService = new TolkBaseOptionsService(Options.Create(new TolkOptions() { RoundPriceDecimals = true })); return(new CacheService(cache, dbContext, optionService)); }
private OrderAgreementService CreateOrderAgreementService(TolkDbContext dbContext, StubSwedishClock clock = null) { IDistributedCache cache = Mock.Of <IDistributedCache>(); TolkBaseOptionsService optionService = new TolkBaseOptionsService(Options.Create(new TolkOptions() { RoundPriceDecimals = true })); _cache = new CacheService(cache, dbContext, optionService); var emailService = new EmailService(Mock.Of <ILogger <EmailService> >(), Options.Create(new TolkOptions()), _clock); return(new OrderAgreementService(dbContext, _logger, clock ?? _clock, _cache, new DateCalculationService(_cache), optionService, emailService)); }