コード例 #1
0
 public the_ribbon_factory()
 {
     viewProvider = Substitute.For<IViewProvider<TestRibbonTypes>>();
     viewModelFactory = new TestViewModelFactory();
     ribbonFactoryUnderTest = new TestRibbonFactory(
         viewModelFactory,
         () => Substitute.For<CustomTaskPaneCollection>(),
         viewProvider,
         new TestContextProvider(),
         Assembly.GetExecutingAssembly());
 }
コード例 #2
0
        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
            };
        }
コード例 #3
0
 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;
     }
 }