public void RunShouldCallConfigureContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureContainerCalled); }
public void RunShouldCallConfigureViewModelLocator() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureViewModelLocatorCalled); }
public void RunShouldCallCreateLogger() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.CreateLoggerCalled); }
public void RunShouldCallCreateAggregateCatalog() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.CreateAggregateCatalogCalled); }
public void RunConfiguresServiceLocatorProvider() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(Microsoft.Practices.ServiceLocation.ServiceLocator.Current is MefServiceLocatorAdapter); }
public void RunShouldCallConfigureModuleCatalog() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureModuleCatalogCalled); }
public void RunShouldCallConfigureDefaultRegionBehaviors() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureDefaultRegionBehaviorsCalled); }
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 RunShouldCallCreateContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.CreateContainerCalled); }
public void RunShouldCallConfigureRegionAdapterMappings() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureRegionAdapterMappingsCalled); }
public void RunConfiguresServiceLocatorProvider() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(CommonServiceLocator.ServiceLocator.Current is MefServiceLocatorAdapter); }
public void RunShouldCallInitializeModules() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.InitializeModulesCalled); }
public void RunShouldAssignRegionManagerToReturnedShell() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.ShellObject = new UserControl(); bootstrapper.Run(); Assert.IsNotNull(RegionManager.GetRegionManager(bootstrapper.BaseShell)); }
public void RunShouldLogAboutInitializingModules() { const string expectedMessageText = "Initializing modules"; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RunShouldLogAboutRunCompleting() { const string expectedMessageText = "Bootstrapper sequence completed"; 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 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 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 RunShouldLogAboutConfiguringViewModelLocator() { const string expectedMessageText = "Configuring the ViewModelLocator to use MEF"; 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 SingleRegionActiveAwareBehaviorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue <RegionActiveAwareBehavior>(); 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 SingleSyncRegionContextWithHostBehaviorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue <SyncRegionContextWithHostBehavior>(); Assert.IsNotNull(exported); }
public void SingleIEventAggregatorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue <IEventAggregator>(); 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 RunShouldLogAboutUpdatingRegions() { const string expectedMessageText = "Updating Regions."; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.ShellObject = new UserControl(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RunShouldCallTheMethodsInOrder() { 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("CreateAggregateCatalog", 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("ConfigureViewModelLocator", bootstrapper.MethodCalls[8]); Assert.AreEqual("ConfigureRegionAdapterMappings", bootstrapper.MethodCalls[9]); Assert.AreEqual("ConfigureDefaultRegionBehaviors", bootstrapper.MethodCalls[10]); Assert.AreEqual("RegisterFrameworkExceptionTypes", bootstrapper.MethodCalls[11]); Assert.AreEqual("CreateShell", bootstrapper.MethodCalls[12]); Assert.AreEqual("InitializeShell", bootstrapper.MethodCalls[13]); Assert.AreEqual("InitializeModules", bootstrapper.MethodCalls[14]); }
public void CanRunBootstrapper() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); }
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 SingleNavigationTargetHandlerIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue<IRegionNavigationContentLoader>(); Assert.IsNotNull(exported); }
public void RunShouldCallInitializeShellWhenShellSucessfullyCreated() { var bootstrapper = new DefaultMefBootstrapper { ShellObject = new UserControl() }; bootstrapper.Run(); Assert.IsTrue(bootstrapper.InitializeShellCalled); }
public void RunShouldLogAboutInitializingTheShellIfShellCreated() { const string expectedMessageText = "Initializing shell"; var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.ShellObject = new UserControl(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.TestLog.LogMessages.Contains(expectedMessageText)); }
public void RegionLifetimeBehaviorIsRegisteredWithContainer() { var bootstrapper = new DefaultMefBootstrapper(); bootstrapper.Run(); var exported = bootstrapper.BaseContainer.GetExportedValue<RegionMemberLifetimeBehavior>(); Assert.IsNotNull(exported); }