當前位置: 首頁>>代碼示例>>C#>>正文


C# Tests.DefaultMefBootstrapper類代碼示例

本文整理匯總了C#中Microsoft.Practices.Prism.MefExtensions.Tests.DefaultMefBootstrapper的典型用法代碼示例。如果您正苦於以下問題:C# DefaultMefBootstrapper類的具體用法?C# DefaultMefBootstrapper怎麽用?C# DefaultMefBootstrapper使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DefaultMefBootstrapper類屬於Microsoft.Practices.Prism.MefExtensions.Tests命名空間,在下文中一共展示了DefaultMefBootstrapper類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: RunShouldCallCreateLogger

        public void RunShouldCallCreateLogger()
        {
            var bootstrapper = new DefaultMefBootstrapper();
            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.CreateLoggerCalled);
        }
開發者ID:xperiandri,項目名稱:PortablePrism,代碼行數:7,代碼來源:MefBootstrapperRunMethodFixture.cs

示例2: RunConfiguresServiceLocatorProvider

        public void RunConfiguresServiceLocatorProvider()
        {
            var bootstrapper = new DefaultMefBootstrapper();
            bootstrapper.Run();

            Assert.IsTrue(ServiceLocation.ServiceLocator.Current is MefServiceLocatorAdapter);
        }
開發者ID:xperiandri,項目名稱:PortablePrism,代碼行數:7,代碼來源:MefBootstrapperRunMethodFixture.cs

示例3: ContainerDefaultsToNull

        public void ContainerDefaultsToNull()
        {
            var bootstrapper = new DefaultMefBootstrapper();
            var container = bootstrapper.BaseContainer;

            Assert.IsNull(container);
        }
開發者ID:CarlosVV,項目名稱:mediavf,代碼行數:7,代碼來源:MefBootstrapperFixture.cs

示例4: RunShouldCallCreateModuleCatalog

        public void RunShouldCallCreateModuleCatalog()
        {
            var bootstrapper = new DefaultMefBootstrapper();
            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.CreateModuleCatalogCalled);
        }
開發者ID:xperiandri,項目名稱:PortablePrism,代碼行數:7,代碼來源:MefBootstrapperRunMethodFixture.cs

示例5: RunShouldCallConfigureAggregateCatalog

        public void RunShouldCallConfigureAggregateCatalog()
        {
            var bootstrapper = new DefaultMefBootstrapper();
            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.ConfigureAggregateCatalogCalled);
        }
開發者ID:selvendiranj,項目名稱:compositewpf-copy,代碼行數:7,代碼來源:MefBootstrapperRunMethodFixture.cs

示例6: CreateContainerShouldNotInitializeContainerProviders

        public void CreateContainerShouldNotInitializeContainerProviders()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.CallCreateContainer();

            Assert.AreEqual(0, bootstrapper.BaseContainer.Providers.Count);
        }
開發者ID:CarlosVV,項目名稱:mediavf,代碼行數:8,代碼來源:MefBootstrapperFixture.cs

示例7: CreateAggregateCatalogShouldInitializeCatalog

        public void CreateAggregateCatalogShouldInitializeCatalog()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.CallCreateAggregateCatalog();

            Assert.IsNotNull(bootstrapper.BaseAggregateCatalog);
        }
開發者ID:CarlosVV,項目名稱:mediavf,代碼行數:8,代碼來源:MefBootstrapperFixture.cs

示例8: CreateContainerShouldInitializeContainer

        public void CreateContainerShouldInitializeContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.CallCreateContainer();

            Assert.IsNotNull(bootstrapper.BaseContainer);
            Assert.IsInstanceOfType(bootstrapper.BaseContainer, typeof(CompositionContainer));
        }
開發者ID:CarlosVV,項目名稱:mediavf,代碼行數:9,代碼來源:MefBootstrapperFixture.cs

示例9: RegionNavigationJournalEntryIsRegisteredWithContainer

        public void RegionNavigationJournalEntryIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();
            bootstrapper.Run();

            var actual1 = bootstrapper.BaseContainer.GetExportedValue<IRegionNavigationJournalEntry>();
            var actual2 = bootstrapper.BaseContainer.GetExportedValue<IRegionNavigationJournalEntry>();

            Assert.IsNotNull(actual1);
            Assert.IsNotNull(actual2);
            Assert.AreNotSame(actual1, actual2);
        }
開發者ID:CarlosVV,項目名稱:mediavf,代碼行數:12,代碼來源:MefBootstrapperFixture.cs

示例10: SingleIRegionBehaviorFactoryIsRegisteredWithContainer

        public void SingleIRegionBehaviorFactoryIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();
            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue<IRegionBehaviorFactory>();
            Assert.IsNotNull(exported);
        }
開發者ID:CarlosVV,項目名稱:mediavf,代碼行數:8,代碼來源:MefBootstrapperFixture.cs

示例11: RegionLifetimeBehaviorIsRegisteredWithContainer

        public void RegionLifetimeBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();
            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue<RegionMemberLifetimeBehavior>();
            Assert.IsNotNull(exported);
        }
開發者ID:CarlosVV,項目名稱:mediavf,代碼行數:8,代碼來源:MefBootstrapperFixture.cs

示例12: SingleRegionActiveAwareBehaviorIsRegisteredWithContainer

        public void SingleRegionActiveAwareBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();
            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue<RegionActiveAwareBehavior>();
            Assert.IsNotNull(exported);
        }
開發者ID:CarlosVV,項目名稱:mediavf,代碼行數:8,代碼來源:MefBootstrapperFixture.cs

示例13: RunShouldCallTheMethodsInOrder

        public async Task RunShouldCallTheMethodsInOrder()
        {
            await ExecuteOnUIThread(() =>
                {
                    var bootstrapper = new DefaultMefBootstrapper { ShellObject = new UserControl() };
                    bootstrapper.Run();

                    Assert.AreEqual("CreateLogger", bootstrapper.MethodCalls[0]);
                    Assert.AreEqual("CreateModuleCatalog", bootstrapper.MethodCalls[1]);
                    Assert.AreEqual("ConfigureModuleCatalog", bootstrapper.MethodCalls[2]);
                    Assert.AreEqual("CreateContainerConfiguration", bootstrapper.MethodCalls[3]);
                    Assert.AreEqual("ConfigureAggregateCatalog", bootstrapper.MethodCalls[4]);
                    Assert.AreEqual("CreateContainer", bootstrapper.MethodCalls[5]);
                    Assert.AreEqual("ConfigureContainer", bootstrapper.MethodCalls[6]);
                    Assert.AreEqual("ConfigureServiceLocator", bootstrapper.MethodCalls[7]);
                    //Assert.AreEqual("ConfigureRegionAdapterMappings", bootstrapper.MethodCalls[8]);
                    //Assert.AreEqual("ConfigureDefaultRegionBehaviors", bootstrapper.MethodCalls[9]);
                    Assert.AreEqual("RegisterFrameworkExceptionTypes", bootstrapper.MethodCalls[8]);
                    Assert.AreEqual("CreateShell", bootstrapper.MethodCalls[9]);
                    Assert.AreEqual("InitializeShell", bootstrapper.MethodCalls[10]);
                    Assert.AreEqual("InitializeModules", bootstrapper.MethodCalls[11]);
                });
        }
開發者ID:xperiandri,項目名稱:PortablePrism,代碼行數:23,代碼來源:MefBootstrapperRunMethodFixture.cs

示例14: RunShouldLogAboutRunCompleting

        public void RunShouldLogAboutRunCompleting()
        {
            const string expectedMessageText = "Bootstrapper sequence completed";
            var bootstrapper = new DefaultMefBootstrapper();
            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
開發者ID:xperiandri,項目名稱:PortablePrism,代碼行數:8,代碼來源:MefBootstrapperRunMethodFixture.cs

示例15: ConfigureContainerAddsAggregateCatalogToContainer

        public void ConfigureContainerAddsAggregateCatalogToContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();
            bootstrapper.CallCreateLogger();
            bootstrapper.CallCreateAggregateCatalog();
            bootstrapper.CallCreateModuleCatalog();
            bootstrapper.CallCreateContainer();
            bootstrapper.CallConfigureContainer();

            var returnedCatalog = bootstrapper.BaseContainer.GetExportedValue<AggregateCatalog>();
            Assert.IsNotNull(returnedCatalog);
            Assert.AreEqual(typeof(AggregateCatalog), returnedCatalog.GetType());
        }
開發者ID:CarlosVV,項目名稱:mediavf,代碼行數:13,代碼來源:MefBootstrapperFixture.cs


注:本文中的Microsoft.Practices.Prism.MefExtensions.Tests.DefaultMefBootstrapper類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。