Beispiel #1
0
        public void RunShouldCallInitializeModules()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

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

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #17
0
        public void RunShouldLogAboutConfiguringContainer()
        {
            const string expectedMessageText = "Configuring MEF container";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
Beispiel #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));
        }
Beispiel #19
0
        public void RunShouldNotLogAboutInitializingTheShellIfShellIsNotCreated()
        {
            const string expectedMessageText = "Initializing shell";
            var          bootstrapper        = new DefaultMefBootstrapper();

            bootstrapper.Run();

            Assert.IsFalse(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText));
        }
        public void SingleRegionActiveAwareBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

            Assert.IsNotNull(exported);
        }
        public void SingleSyncRegionContextWithHostBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

            Assert.IsNotNull(exported);
        }
        public void SingleIRegionBehaviorFactoryIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

            Assert.IsNotNull(exported);
        }
        public void RegionLifetimeBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

            Assert.IsNotNull(exported);
        }
        public void SingleNavigationTargetHandlerIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

            Assert.IsNotNull(exported);
        }
        public void SingleBindRegionContextToDependencyObjectBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

            Assert.IsNotNull(exported);
        }
        public void SingleItemsControlRegionAdapterIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

            Assert.IsNotNull(exported);
        }
        public void SingleIModuleInitializerIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

            Assert.IsNotNull(exported);
        }
        public void SingleIEventAggregatorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

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

            bootstrapper.ShellObject = new UserControl();

            bootstrapper.Run();

            Assert.IsNotNull(RegionManager.GetRegionManager(bootstrapper.BaseShell));
        }
        public void SingleSelectorItemsSourceSyncBehaviorIsRegisteredWithContainer()
        {
            var bootstrapper = new DefaultMefBootstrapper();

            bootstrapper.Run();

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

            Assert.IsNotNull(exported);
        }