public void RunShouldCallInitializeModules() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); Assert.True(bootstrapper.InitializeModulesCalled); }
public void RunShouldCallConfigureRegionAdapterMappings() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); Assert.True(bootstrapper.ConfigureRegionAdapterMappingsCalled); }
public void RunConfiguresServiceLocatorProvider() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); Assert.True(ServiceLocator.Current is DryIocServiceLocatorAdapter); }
public void RunShouldNotFailIfReturnedNullShell() { var bootstrapper = new DefaultDryIocBootstrapper { ShellObject = null }; bootstrapper.Run(); }
public void RunShouldCallCreateShell() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); Assert.True(bootstrapper.CreateShellCalled); }
public void RunShouldCallConfigureContainer() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); Assert.True(bootstrapper.ConfigureContainerCalled); }
public void RunShouldCallConfigureModuleCatalog() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); Assert.True(bootstrapper.ConfigureModuleCatalogCalled); }
public void RunShouldAssignRegionManagerToReturnedShell() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); Assert.NotNull(RegionManager.GetRegionManager(bootstrapper.BaseShell)); }
public void RunShouldCallConfigureDefaultRegionBehaviors() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); Assert.True(bootstrapper.ConfigureDefaultRegionBehaviorsCalled); }
public void RunShouldLogAboutCreatingTheShell() { const string expectedMessageText = "Creating the shell."; var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.True(messages.Contains(expectedMessageText)); }
public void ConfigureContainerAddsLoggerFacadeToContainer() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var returnedCatalog = bootstrapper.BaseContainer.Resolve <ILoggerFacade>(); Assert.IsNotNull(returnedCatalog); }
public void RunShouldLogAboutInitializingModules() { const string expectedMessageText = "Initializing modules."; var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.True(messages.Contains(expectedMessageText)); }
public void RunShouldLogAboutRegisteringFrameworkExceptionTypes() { const string expectedMessageText = "Registering Framework Exception Types."; var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.True(messages.Contains(expectedMessageText)); }
public void RunShouldLogAboutConfiguringContainerBuilder() { const string expectedMessageText = "Configuring the DryIoc container."; var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.True(messages.Contains(expectedMessageText)); }
public void RunShouldLogAboutConfiguringRegionBehaviors() { const string expectedMessageText = "Configuring default region behaviors."; var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.True(messages.Contains(expectedMessageText)); }
public void RunShouldLogLoggerCreationSuccess() { const string expectedMessageText = "Logger was created successfully."; var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.True(messages.Contains(expectedMessageText)); }
public void RunShouldLogAboutConfiguringModuleCatalog() { const string expectedMessageText = "Configuring module catalog."; var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.True(messages.Contains(expectedMessageText)); }
public void RunShouldLogAboutRunCompleting() { const string expectedMessageText = "Bootstrapper sequence completed."; var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.True(messages.Contains(expectedMessageText)); }
public void ConfigureContainerAddsModuleCatalogToContainer() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var returnedCatalog = bootstrapper.BaseContainer.Resolve <IModuleCatalog>(); Assert.IsNotNull(returnedCatalog); Assert.IsTrue(returnedCatalog is ModuleCatalog); }
public void RunRegistersTypeForRegionAdapterMappings() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var regionAdapterMappings = bootstrapper.BaseContainer.Resolve <RegionAdapterMappings>(); Assert.NotNull(regionAdapterMappings); Assert.Equal(typeof(RegionAdapterMappings), regionAdapterMappings.GetType()); }
public void RunRegistersInstanceOfILoggerFacade() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var logger = bootstrapper.BaseContainer.Resolve <ILoggerFacade>(); Assert.NotNull(logger); Assert.True(logger.GetType().IsClass); Assert.Contains(typeof(ILoggerFacade), logger.GetType().GetInterfaces()); }
public void RunRegistersTypeForIEventAggregator() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var eventAggregator = bootstrapper.BaseContainer.Resolve <IEventAggregator>(); Assert.NotNull(eventAggregator); Assert.True(eventAggregator.GetType().IsClass); Assert.Contains(typeof(IEventAggregator), eventAggregator.GetType().GetInterfaces()); }
public void RunRegistersInstanceOfIModuleCatalog() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var moduleCatalog = bootstrapper.BaseContainer.Resolve <IModuleCatalog>(); Assert.NotNull(moduleCatalog); Assert.True(moduleCatalog.GetType().IsClass); Assert.Contains(typeof(IModuleCatalog), moduleCatalog.GetType().GetInterfaces()); }
public void RunShouldNotLogAboutInitializingTheShellIfShellIsNotCreated() { const string expectedMessageText = "Initializing shell"; var bootstrapper = new DefaultDryIocBootstrapper { ShellObject = null }; bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.False(messages.Contains(expectedMessageText)); }
public void RunRegistersTypeForIModuleInitializer() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var moduleInitializer = bootstrapper.BaseContainer.Resolve <IModuleInitializer>(); Assert.NotNull(moduleInitializer); Assert.True(moduleInitializer.GetType().IsClass); Assert.Contains(typeof(IModuleInitializer), moduleInitializer.GetType().GetInterfaces()); }
public void RunRegistersTypeForIRegionBehaviorFactory() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var regionBehaviorFactory = bootstrapper.BaseContainer.Resolve <IRegionBehaviorFactory>(); Assert.NotNull(regionBehaviorFactory); Assert.True(regionBehaviorFactory.GetType().IsClass); Assert.Contains(typeof(IRegionBehaviorFactory), regionBehaviorFactory.GetType().GetInterfaces()); }
public void RunRegistersTypeForIRegionManager() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var regionManager = bootstrapper.BaseContainer.Resolve <IRegionManager>(); Assert.IsNotNull(regionManager); Assert.IsTrue(regionManager.GetType().IsClass); Assert.IsTrue(regionManager.GetType().GetInterfaces().Contains(typeof(IRegionManager))); }
public void RunRegistersTypeForIServiceLocator() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var serviceLocator = bootstrapper.BaseContainer.Resolve <IServiceLocator>(); Assert.NotNull(serviceLocator); Assert.True(serviceLocator.GetType().IsClass); Assert.Equal(typeof(DryIocServiceLocatorAdapter), serviceLocator.GetType()); Assert.Contains(typeof(IServiceLocator), serviceLocator.GetType().GetInterfaces()); }
public void ConfigureContainerAddsRegionNavigationJournalToContainer() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var actual1 = bootstrapper.BaseContainer.Resolve <IRegionNavigationJournal>(); var actual2 = bootstrapper.BaseContainer.Resolve <IRegionNavigationJournal>(); Assert.IsNotNull(actual1); Assert.IsNotNull(actual2); Assert.AreNotSame(actual1, actual2); }
public void ConfigureContainerAddsNavigationTargetHandlerToContainer() { var bootstrapper = new DefaultDryIocBootstrapper(); bootstrapper.Run(); var actual1 = bootstrapper.BaseContainer.Resolve <IRegionNavigationContentLoader>(); var actual2 = bootstrapper.BaseContainer.Resolve <IRegionNavigationContentLoader>(); Assert.IsNotNull(actual1); Assert.IsNotNull(actual2); Assert.AreSame(actual1, actual2); }