Ejemplo n.º 1
0
 //
 // GET: /JewelryItem/
 public JewelryItemController(IJewelRepository jewelRepository, IMediaSetBuilder mediaSetBuilder, IWebHelpers webHelpers, IFileSystem fileSystem, IBestOffer bestOffer, IWishListPersistence wishListPersistence, ITestimonialRepository testimonailRepository, IUserMailer mailer, IPathBarGenerator pathBarGenerator, IMappingEngine mapper)
 {
     this.jewelRepository = jewelRepository;
     this.mediaSetBuilder = mediaSetBuilder;
     this.webHelpers = webHelpers;
     this.fileSystem = fileSystem;
     this.bestOffer = bestOffer;
     this.wishListPersistence = wishListPersistence;
     this.testimonailRepository = testimonailRepository;
     this.mailer = mailer;
     this.pathBarGenerator = pathBarGenerator;
     this.mapper = mapper;
 }
Ejemplo n.º 2
0
        //
        // GET: /JewelryItem/

        public JewelryItemController(IJewelRepository jewelRepository, IMediaSetBuilder mediaSetBuilder, IWebHelpers webHelpers, IFileSystem fileSystem, IBestOffer bestOffer, IWishListPersistence wishListPersistence, ITestimonialRepository testimonailRepository, IUserMailer mailer, IPathBarGenerator pathBarGenerator, IMappingEngine mapper)
        {
            this.jewelRepository       = jewelRepository;
            this.mediaSetBuilder       = mediaSetBuilder;
            this.webHelpers            = webHelpers;
            this.fileSystem            = fileSystem;
            this.bestOffer             = bestOffer;
            this.wishListPersistence   = wishListPersistence;
            this.testimonailRepository = testimonailRepository;
            this.mailer           = mailer;
            this.pathBarGenerator = pathBarGenerator;
            this.mapper           = mapper;
        }
        private JewelryItemController CreateJewelryItemControllerWithCustomBestOffer(IBestOffer bestOffer)
        {
            var fileSystem        = FakeFileSystem.MediaFileSystemForItemNumber("0101-15421");
            var settingManager    = new FakeSettingManager();
            var jewelryRepository = new FakeJewelRepository(settingManager);
            var webHelpers        = GetWebHelpers();
            var mediaSetBuilder   = GetMediaSetBuilder();
            var fakeMailer        = MockRepository.GenerateStub <IUserMailer>();

            var wishListPersistence       = MockRepository.GenerateStub <IWishListPersistence>();
            var fakeTestimonailRepository = new FakeTestimonialRepository(mapper);
            var pathbarGenerator          = MockRepository.GenerateStub <IPathBarGenerator>();

            var controller = new JewelryItemController(jewelryRepository, mediaSetBuilder, webHelpers, fileSystem, bestOffer,
                                                       wishListPersistence, fakeTestimonailRepository, fakeMailer, pathbarGenerator, mapper);

            return(controller);
        }
        private JewelryItemController CreateJewelryItemControllerWithCustomBestOffer(IBestOffer bestOffer)
        {
            var fileSystem = FakeFileSystem.MediaFileSystemForItemNumber("0101-15421");
            var settingManager = new FakeSettingManager();
            var jewelryRepository = new FakeJewelRepository(settingManager);
            var webHelpers = GetWebHelpers();
            var mediaSetBuilder = GetMediaSetBuilder();
            var fakeMailer = MockRepository.GenerateStub<IUserMailer>();

            var wishListPersistence = MockRepository.GenerateStub<IWishListPersistence>();
            var fakeTestimonailRepository = new FakeTestimonialRepository(mapper);
            var pathbarGenerator = MockRepository.GenerateStub<IPathBarGenerator>();

            var controller = new JewelryItemController(jewelryRepository, mediaSetBuilder, webHelpers, fileSystem, bestOffer,
                                                       wishListPersistence, fakeTestimonailRepository, fakeMailer, pathbarGenerator, mapper);
            return controller;
        }