public the_ribbon_factory() { viewProvider = Substitute.For<IViewProvider<TestRibbonTypes>>(); viewModelFactory = new TestViewModelFactory(); ribbonFactoryUnderTest = new TestRibbonFactory( viewModelFactory, () => Substitute.For<CustomTaskPaneCollection>(), viewProvider, new TestContextProvider(), Assembly.GetExecutingAssembly()); }
public the_ribbon_factory() { viewProvider = Substitute.For <IViewProvider>(); viewModelFactory = new TestViewModelFactory(); testAddInBase = AddInBaseFactory.Create(); ribbonFactoryUnderTest = new TestRibbonFactory( testAddInBase, viewProvider, new TestContextProvider(), "Foo", Assembly.GetExecutingAssembly()) { ViewModelFactory = viewModelFactory }; }
public the_ribbon_factory() { viewProvider = Substitute.For<IViewProvider>(); viewModelFactory = new TestViewModelFactory(); testAddInBase = AddInBaseFactory.Create(); if (Core.RibbonFactory.RibbonFactory.Current == null) { ribbonFactoryUnderTest = new TestRibbonFactory( testAddInBase, viewProvider, new TestContextProvider(), "Foo", Assembly.GetExecutingAssembly()) { ViewModelFactory = viewModelFactory }; } else { ribbonFactoryUnderTest = (TestRibbonFactory)Core.RibbonFactory.RibbonFactory.Current; } }