public ActionResult Setting(CustomJewelPersistenceForSetting customJewelPersistenceForSetting) { var tabsForJewelNavigation = new TabsForJewelDesignNavigationBuilder(customJewelPersistenceForSetting, diamondRepository, jewelRepository, webHelpers); tabsForJewelNavigation.WhichTabToHighLight(NagivationTabType.ChooseSetting); jewelRepository.FilterMediaByMetal(customJewelPersistenceForSetting.MediaType == 0 ? JewelMediaType.WhiteGold : customJewelPersistenceForSetting.MediaType); var jewelryItemViewModelBuilder = new JewelryItemViewModelBuilder(customJewelPersistenceForSetting.SettingID, jewelRepository,testimonialRepository ,fileSystem,mapper); var builder = new SettingViewModelBuilder(customJewelPersistenceForSetting, tabsForJewelNavigation, jewelryItemViewModelBuilder); var viewModel = builder.Build(); viewModel.PathBarItems = pathBarGenerator.GenerateUsing<UsingDynamicTitlePathBarResolver, dynamic>(viewModel); return View(viewModel); }
private SettingViewModelBuilder CreateDefaultSettingViewModelBuilderWithCustomModel(CustomJewelPersistenceForSetting customJewelForSetting) { var settingManager = new FakeSettingManager(); var jewelryRepository = new FakeJewelRepository(settingManager); var diamondRepository = new FakeDiamondRepository(mapper); var webHelpers = MockRepository.GenerateStub<IWebHelpers>(); var tabsForJewelDesignBuilder = new TabsForJewelDesignNavigationBuilder(customJewelForSetting, diamondRepository, jewelryRepository, webHelpers); var fakeRepository = new FakeJewelRepository(settingManager); var fileSystem = FakeFileSystem.MediaFileSystemForItemNumber("0101-15421"); var fakeTestimonialRepository = new FakeTestimonialRepository(mapper); var jewelryItemViewModelBuilder = new JewelryItemViewModelBuilder(Tests.FAKE_JEWELRY_REPOSITORY_FIRST_ITEM_ID, fakeRepository, fakeTestimonialRepository, fileSystem, mapper); var builder = new SettingViewModelBuilder(customJewelForSetting, tabsForJewelDesignBuilder, jewelryItemViewModelBuilder); return builder; }