コード例 #1
0
        public void RunShouldCallInitializeModules()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.InitializeModulesCalled);
        }
コード例 #2
0
        public void RunShouldCallCreateAggregateCatalog()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.CreateAggregateCatalogCalled);
        }
コード例 #3
0
        public void RunShouldCallConfigureModuleCatalog()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.ConfigureModuleCatalogCalled);
        }
コード例 #4
0
        public void RunShouldCallConfigureContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.ConfigureContainerCalled);
        }
コード例 #5
0
        public void RunShouldCallConfigureDefaultRegionBehaviors()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.ConfigureDefaultRegionBehaviorsCalled);
        }
コード例 #6
0
        public void RunShouldCallRegisterFrameworkExceptionTypes()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.RegisterFrameworkExceptionTypesCalled);
        }
コード例 #7
0
        public void RunShouldNotCallInitializeShellWhenShellNotCreated()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsFalse(bootstrapper.InitializeShellCalled);
        }
コード例 #8
0
        public void RunShouldCallCreateLogger()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.CreateLoggerCalled);
        }
コード例 #9
0
        public void RunShouldCallConfigureRegionAdapterMappings()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.ConfigureRegionAdapterMappingsCalled);
        }
コード例 #10
0
        public void RunConfiguresServiceLocatorProvider()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(Microsoft.Practices.ServiceLocation.ServiceLocator.Current is MefServiceLocatorAdapter);
        }
コード例 #11
0
        public void RunShouldLogAboutRunCompleting()
        {
            const string expectedMessageText = "Bootstrapper sequence completed";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
コード例 #12
0
        public void RunShouldLogAboutCreatingTheShell()
        {
            const string expectedMessageText = "Creating shell";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
コード例 #13
0
        public void RunShouldLogAboutInitializingModules()
        {
            const string expectedMessageText = "Initializing modules";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
コード例 #14
0
        public void RunShouldLogAboutConfiguringRegionBehaviors()
        {
            const string expectedMessageText = "Configuring default region behaviors";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
コード例 #15
0
        public void RunShouldLogAboutRegisteringFrameworkExceptionTypes()
        {
            const string expectedMessageText = "Registering Framework Exception Types";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
コード例 #16
0
        public void RunShouldLogLoggerCreationSuccess()
        {
            const string expectedMessageText = "Logger was created successfully.";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
コード例 #17
0
        public void RunShouldLogAboutConfiguringContainer()
        {
            const string expectedMessageText = "Configuring MEF container";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
コード例 #18
0
        public void RunShouldLogAboutAggregateCatalogCreation()
        {
            const string expectedMessageText = "Creating catalog for MEF";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
コード例 #19
0
        public void RunShouldNotLogAboutInitializingTheShellIfShellIsNotCreated()
        {
            const string expectedMessageText = "Initializing shell";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsFalse(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
コード例 #20
0
        public void SingleRegionActiveAwareBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue <RegionActiveAwareBehavior>();

            Assert.IsNotNull(exported);
        }
コード例 #21
0
        public void SingleSyncRegionContextWithHostBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue <SyncRegionContextWithHostBehavior>();

            Assert.IsNotNull(exported);
        }
コード例 #22
0
        public void SingleIRegionBehaviorFactoryIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue <IRegionBehaviorFactory>();

            Assert.IsNotNull(exported);
        }
コード例 #23
0
        public void RegionLifetimeBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue <RegionMemberLifetimeBehavior>();

            Assert.IsNotNull(exported);
        }
コード例 #24
0
        public void SingleNavigationTargetHandlerIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue <IRegionNavigationContentLoader>();

            Assert.IsNotNull(exported);
        }
コード例 #25
0
        public void SingleBindRegionContextToDependencyObjectBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue <BindRegionContextToDependencyObjectBehavior>();

            Assert.IsNotNull(exported);
        }
コード例 #26
0
        public void SingleItemsControlRegionAdapterIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue <ItemsControlRegionAdapter>();

            Assert.IsNotNull(exported);
        }
コード例 #27
0
        public void SingleIModuleInitializerIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue <IModuleInitializer>();

            Assert.IsNotNull(exported);
        }
コード例 #28
0
        public void SingleIEventAggregatorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue <IEventAggregator>();

            Assert.IsNotNull(exported);
        }
コード例 #29
0
        public void RunShouldAssignRegionManagerToReturnedShell()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.ShellObject = new UserControl();

            bootstrapper.Run();

            Assert.IsNotNull(RegionManager.GetRegionManager(bootstrapper.BaseShell));
        }
コード例 #30
0
        public void SingleSelectorItemsSourceSyncBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

            var exported = bootstrapper.BaseContainer.GetExportedValue <SelectorItemsSourceSyncBehavior>();

            Assert.IsNotNull(exported);
        }