当前位置: 首页>>代码示例>>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;未经允许,请勿转载。