public void ContainerDefaultsToNull() { var bootstrapper = new DefaultMunqBootstrapper(); var container = bootstrapper.Container; container.ShouldBeNull(); }
public void RunShouldCallCreateShell() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); bootstrapper.CreateShellCalled.ShouldBeTrue(); }
public void RunShouldCallConfigureModuleCatalog() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); bootstrapper.ConfigureModuleCatalogCalled.ShouldBeTrue(); }
public void RunShouldAssignRegionManagerToReturnedShell() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); RegionManager.GetRegionManager(bootstrapper.BaseShell).ShouldNotBeNull(); }
public void RunShouldCallConfigureRegionAdapterMappings() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); bootstrapper.ConfigureRegionAdapterMappingsCalled.ShouldBeTrue(); }
public void RunShouldCallConfigureDefaultRegionBehaviors() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); bootstrapper.ConfigureDefaultRegionBehaviorsCalled.ShouldBeTrue(); }
public void RunShouldCallInitializeModules() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); bootstrapper.InitializeModulesCalled.ShouldBeTrue(); }
public void RunShouldCallConfigureViewModelLocator() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); bootstrapper.ConfigureViewModelLocatorCalled.ShouldBeTrue(); }
public void RunConfiguresServiceLocatorProvider() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); ServiceLocator.Current.ShouldBeOfType <MunqServiceLocatorAdapter>(); }
public void RunShouldCallConfigureContainer() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); bootstrapper.ConfigureContainerCalled.ShouldBeTrue(); }
public void RunShouldNotFailIfReturnedNullShell() { var bootstrapper = new DefaultMunqBootstrapper { ShellObject = null }; Should.NotThrow(() => bootstrapper.Run()); }
public void CreateContainerShouldInitializeContainer() { var bootstrapper = new DefaultMunqBootstrapper(); var container = bootstrapper.CallCreateContainer(); container.ShouldNotBeNull(); container.ShouldBeOfType <MunqContainerWrapper>(); }
public void ConfigureContainerAddsLoggerFacadeToContainer() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); var returnedCatalog = bootstrapper.BaseContainer.Resolve <ILoggerFacade>(); returnedCatalog.ShouldNotBeNull(); }
public void RunAddsDependencyRegistrarToContainer() { var bootstrapper = new DefaultMunqBootstrapper(); var createdContainer = bootstrapper.CallCreateContainer(); var returnedContainer = createdContainer.Resolve <IDependecyRegistrar>(); returnedContainer.ShouldNotBeNull(); returnedContainer.ShouldBeOfType <MunqContainerWrapper>(); }
public void RunShouldLogAboutRunCompleting() { const string expectedMessageText = "Bootstrapper sequence completed."; var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); IList <string> messages = bootstrapper.BaseLogger.Messages; messages.ShouldContain(expectedMessageText); }
public void RunAddsCompositionContainerToContainer() { var bootstrapper = new DefaultMunqBootstrapper(); var createdContainer = bootstrapper.CallCreateContainer(); var returnedContainer = createdContainer.Resolve <IIocContainer>(); returnedContainer.ShouldNotBeNull(); returnedContainer.ShouldBeOfType <MunqContainerWrapper>(); }
public void RunShouldLogAboutRegisteringFrameworkExceptionTypes() { const string expectedMessageText = "Registering Framework Exception Types."; var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); IList <string> messages = bootstrapper.BaseLogger.Messages; messages.ShouldContain(expectedMessageText); }
public void RunShouldLogAboutInitializingModules() { const string expectedMessageText = "Initializing modules."; var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); IList <string> messages = bootstrapper.BaseLogger.Messages; messages.ShouldContain(expectedMessageText); }
public void RunShouldLogAboutInitializingTheShellIfShellCreated() { const string expectedMessageText = "Initializing the shell."; var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); IList <string> messages = bootstrapper.BaseLogger.Messages; messages.ShouldContain(expectedMessageText); }
public void RunShouldLogAboutConfiguringViewModelLocator() { const string expectedMessageText = "Configuring the ViewModelLocator to use Munq."; var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); IList <string> messages = bootstrapper.BaseLogger.Messages; messages.ShouldContain(expectedMessageText); }
public void RunShouldLogAboutConfiguringRegionBehaviors() { const string expectedMessageText = "Configuring default region behaviors."; var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); IList <string> messages = bootstrapper.BaseLogger.Messages; messages.ShouldContain(expectedMessageText); }
public void RunShouldLogAboutConfiguringModuleCatalog() { const string expectedMessageText = "Configuring module catalog."; var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); IList <string> messages = bootstrapper.BaseLogger.Messages; messages.ShouldContain(expectedMessageText); }
public void RunShouldLogAboutCreatingTheContainer() { const string expectedMessageText = "Creating Munq container."; var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); IList <string> messages = bootstrapper.BaseLogger.Messages; messages.ShouldContain(expectedMessageText); }
public void RunShouldLogLoggerCreationSuccess() { const string expectedMessageText = "Logger was created successfully."; var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); IList <string> messages = bootstrapper.BaseLogger.Messages; messages.ShouldContain(expectedMessageText); }
public void ConfigureContainerAddsModuleCatalogToContainer() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); var returnedCatalog = bootstrapper.BaseContainer.Resolve <IModuleCatalog>(); returnedCatalog.ShouldNotBeNull(); returnedCatalog.ShouldBeAssignableTo <ModuleCatalog>(); }
public void RunShouldNotLogAboutInitializingTheShellIfShellIsNotCreated() { const string expectedMessageText = "Initializing shell"; var bootstrapper = new DefaultMunqBootstrapper { ShellObject = null }; bootstrapper.Run(); IList <string> messages = bootstrapper.BaseLogger.Messages; messages.ShouldNotContain(expectedMessageText); }
public void ConfigureContainerAddsNavigationTargetHandlerToContainer() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); var actual1 = bootstrapper.BaseContainer.Resolve <IRegionNavigationContentLoader>(); var actual2 = bootstrapper.BaseContainer.Resolve <IRegionNavigationContentLoader>(); actual1.ShouldNotBeNull(); actual2.ShouldNotBeNull(); actual1.ShouldBeSameAs(actual2); }
public void ConfigureContainerAddsRegionNavigationServiceToContainer() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); var actual1 = bootstrapper.BaseContainer.Resolve <IRegionNavigationService>(); var actual2 = bootstrapper.BaseContainer.Resolve <IRegionNavigationService>(); actual1.ShouldNotBeNull(); actual2.ShouldNotBeNull(); actual1.ShouldNotBeSameAs(actual2); }
public void RunShouldInitializeContainer() { var bootstrapper = new DefaultMunqBootstrapper(); var container = bootstrapper.BaseContainer; container.ShouldBeNull(); bootstrapper.Run(); container = bootstrapper.BaseContainer; container.ShouldNotBeNull(); container.ShouldBeOfType <MunqContainerWrapper>(); }
public void ShouldLocateViewModelAndResolveWithContainer() { var bootstrapper = new DefaultMunqBootstrapper(); bootstrapper.Run(); bootstrapper.BaseContainer.Register <IService, MockService>(); var view = new MockView(); view.DataContext.ShouldBeNull(); ViewModelLocator.SetAutoWireViewModel(view, value: true); view.DataContext.ShouldNotBeNull(); view.DataContext.ShouldBeOfType <MockViewModel>(); ((MockViewModel)view.DataContext).MockService.ShouldNotBeNull(); }