Exemple #1
0
 public CreatePriceRangeHandler
     (NotificationContext notificationContext,
     IPriceRangeRepository priceRangeRepository)
 {
     _notificationContext  = notificationContext;
     _priceRangeRepository = priceRangeRepository;
 }
        public PriceRangeService(IPriceRangeRepository priceRangeRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(priceRangeRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _priceRangeRepository = priceRangeRepository;
            _referenceGenerator = referenceGenerator;
        }
 public PutItemHandler(
     NotificationContext notificationContext,
     IItemRepository itemRepository,
     IPriceRangeRepository priceRangeRepository)
 {
     _notificationContext  = notificationContext;
     _itemRepository       = itemRepository;
     _priceRangeRepository = priceRangeRepository;
 }
        public QuoteService(IQuoteRepository quoteRepository, 
                            IPriceRangeRepository priceRangeRepository, 
                            ISearchRepository searchRepository, 
                            IReferenceGenerator referenceGenerator)
        {
            Check.If(quoteRepository).IsNotNull();
            Check.If(priceRangeRepository).IsNotNull();
            Check.If(searchRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _quoteRepository = quoteRepository;
            _referenceGenerator = referenceGenerator;
            _searchRepository = searchRepository;
            _priceRangeRepository = priceRangeRepository;
        }
        public void Setup()
        {
            _mockDbSettings.Setup(x => x.ConnectionString).Returns("TestConectionString");
            _mockContext.Setup(x => x.PriceRanges).Returns(_mockDbSet.Object);
            _mockContext.Setup(x => x.SaveChanges()).Returns(1);
            _mockPriceRangeMapper.Setup(x => x.Map(It.IsAny<PriceRange>(), It.IsAny<PriceRange>())).Returns(true);

            _priceRangeRepository = new PriceRangeRepository(_mockContext.Object,
                _mockPriceRangeMapper.Object);
        }
Exemple #6
0
 public GetAllPricesRangesHandler(
     NotificationContext notificationContext, IPriceRangeRepository priceRangeRepository)
 {
     _notificationContext  = notificationContext;
     _priceRangeRepository = priceRangeRepository;
 }