public void Setup() { _cacheManger = new NopNullCache(); _eventPublisher = MockRepository.GenerateMock<IEventPublisher>(); _solFunFeaRepository = MockRepository.GenerateMock<IRepository<SolutionFeature>>(); var solfunfea1 = new SolutionFeature() { Id = 1, FeatureId = 1 }; var solfunfea2 = new SolutionFeature() { Id = 2, FeatureId = 1 }; var solfunfea3 = new SolutionFeature() { Id = 3, FeatureId = 1 }; var solfunfea4 = new SolutionFeature() { Id = 4, FeatureId = 2 }; var solfunfea5 = new SolutionFeature() { Id = 5, FeatureId = 2 }; _solFunFeaRepository.Expect(s => s.TableNoTracking).Return(new List<SolutionFeature> { solfunfea1, solfunfea2, solfunfea3, solfunfea4, solfunfea5 }.AsQueryable()); _solutionFunderFeatureService = new SolutionFunderFeatureService(_cacheManger, _solFunFeaRepository, _eventPublisher); }
public SolutionService(ICacheManager cacheManager, IRepository<Solution> solRepository, IEventPublisher eventPublisher, ISolutionBPCalculationService solBPCalService, IProductType1ConfigService proType1ConfigService, ISolutionFunderFeatureService solFunFeaService, ISolutionFeatureConfigService solFeaConfigService, ISolutionFunderService solFunService) { this._cacheManager = cacheManager; this._solRepository = solRepository; this._eventPublisher = eventPublisher; this._solBPCalService = solBPCalService; this._proType1ConfigService = proType1ConfigService; this._solFunFeaService = solFunFeaService; this._solFeaConfigService = solFeaConfigService; this._solFunService = solFunService; }