public void RunConfiguresServiceLocatorProvider() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(ServiceLocation.ServiceLocator.Current is MefServiceLocatorAdapter); }
public void RunShouldCallCreateLogger() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.CreateLoggerCalled); }
public void RunShouldCallCreateModuleCatalog() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.CreateModuleCatalogCalled); }
public void RunShouldCallConfigureAggregateCatalog() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureAggregateCatalogCalled); }
public void RunShouldCallInitializeModules() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.InitializeModulesCalled); }
public void RunShouldNotCallInitializeShellWhenShellNotCreated() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsFalse(bootstrapper.InitializeShellCalled); }
public void RunShouldCallRegisterFrameworkExceptionTypes() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.RegisterFrameworkExceptionTypesCalled); }
public void RunShouldCallConfigureDefaultRegionBehaviors() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureDefaultRegionBehaviorsCalled); }
public void RunShouldCallConfigureContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureContainerCalled); }
public void RunShouldCallCreateAggregateCatalog() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.CreateAggregateCatalogCalled); }
public void RunShouldCallConfigureModuleCatalog() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureModuleCatalogCalled); }
public void RunShouldCallConfigureRegionAdapterMappings() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureRegionAdapterMappingsCalled); }
public void RunShouldLogAboutRunCompleting() { const string expectedMessageText = "Bootstrapper sequence completed"; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RunShouldLogAboutInitializingModules() { const string expectedMessageText = "Initializing modules"; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RunShouldNotLogAboutInitializingTheShellIfShellIsNotCreated() { const string expectedMessageText = "Initializing shell"; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsFalse(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RunShouldLogAboutCreatingTheShell() { const string expectedMessageText = "Creating shell"; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RunShouldLogAboutRegisteringFrameworkExceptionTypes() { const string expectedMessageText = "Registering Framework Exception Types"; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RunShouldLogAboutConfiguringContainer() { const string expectedMessageText = "Configuring MEF container"; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RunShouldLogAboutAggregateCatalogCreation() { const string expectedMessageText = "Creating catalog for MEF"; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RunShouldLogLoggerCreationSuccess() { const string expectedMessageText = "Logger was created successfully."; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RunShouldLogAboutConfiguringRegionBehaviors() { const string expectedMessageText = "Configuring default region behaviors"; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void SingleNavigationTargetHandlerIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue <IRegionNavigationContentLoader>(); Assert.IsNotNull(exported); }
public void RegionLifetimeBehaviorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue <RegionMemberLifetimeBehavior>(); Assert.IsNotNull(exported); }
public void SingleIRegionBehaviorFactoryIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue <IRegionBehaviorFactory>(); Assert.IsNotNull(exported); }
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 SingleItemsControlRegionAdapterIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue <ItemsControlRegionAdapter>(); Assert.IsNotNull(exported); }
public void SingleBindRegionContextToDependencyObjectBehaviorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue <BindRegionContextToDependencyObjectBehavior>(); Assert.IsNotNull(exported); }
public void SingleIEventAggregatorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue <IEventAggregator>(); Assert.IsNotNull(exported); }
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); }
public void SingleIModuleInitializerIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue <IModuleInitializer>(); Assert.IsNotNull(exported); }
public void SingleBindRegionContextToDependencyObjectBehaviorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue<BindRegionContextToDependencyObjectBehavior>(); Assert.IsNotNull(exported); }
public void SingleSyncRegionContextWithHostBehaviorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue<SyncRegionContextWithHostBehavior>(); Assert.IsNotNull(exported); }
public void CanRunBootstrapper() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); }
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]); }); }
public async Task RunShouldLogAboutInitializingTheShellIfShellCreated() { await ExecuteOnUIThread(() => { const string expectedMessageText = "Initializing shell"; var bootstrapper = new DefaultMefBootstrapper() { ShellObject = new UserControl() }; bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }); }
public void SingleIModuleInitializerIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue<IModuleInitializer>(); Assert.IsNotNull(exported); }
public void RunShouldCallSetupContainerConfiguration() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.SetupContainerConfigurationCalled); }
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); }
public void SingleIRegionBehaviorFactoryIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue<IRegionBehaviorFactory>(); Assert.IsNotNull(exported); }
public void SingleSelectorItemsSourceSyncBehaviorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue<SelectorItemsSourceSyncBehavior>(); Assert.IsNotNull(exported); }
public void SingleIEventAggregatorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue<IEventAggregator>(); Assert.IsNotNull(exported); }
public void SingleItemsControlRegionAdapterIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue<ItemsControlRegionAdapter>(); Assert.IsNotNull(exported); }
public async Task RunShouldCallInitializeShellWhenShellSucessfullyCreated() { await ExecuteOnUIThread(() => { var bootstrapper = new DefaultMefBootstrapper { ShellObject = new UserControl() }; bootstrapper.Run(); Assert.IsTrue(bootstrapper.InitializeShellCalled); }); }
public void SingleRegionActiveAwareBehaviorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue<RegionActiveAwareBehavior>(); 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); }