public void KernelDefaultsToNull() { var bootstrapper = new DefaultNinjectBootstrapper(); var kernel = bootstrapper.Kernel; Assert.IsNull(kernel); }
public void RunShouldCallConfigureRegionAdapterMappings() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureRegionAdapterMappingsCalled); }
public void RunShouldCallConfigureModuleCatalog() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureModuleCatalogCalled); }
public void RunShouldAssignRegionManagerToReturnedShell() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); Assert.IsNotNull(RegionManager.GetRegionManager(bootstrapper.BaseShell)); }
public void RunShouldCallCreateShell() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.CreateShellCalled); }
public void RunShouldCallInitializeModules() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.InitializeModulesCalled); }
public void RunShouldNotFailIfReturnedNullShell() { var bootstrapper = new DefaultNinjectBootstrapper { ShellObject = null }; bootstrapper.Run(); }
public void RunConfiguresServiceLocatorProvider() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); Assert.IsTrue(ServiceLocator.Current is NinjectServiceLocatorAdapter); }
public void RunShouldCallConfigureDefaultRegionBehaviors() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureDefaultRegionBehaviorsCalled); }
public void RunShouldCallConfigureViewModelLocator() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureViewModelLocatorCalled); }
public void RunShouldCallConfigureKernel() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureKernelCalled); }
public void CreateKernelShouldInitializeKernel() { var bootstrapper = new DefaultNinjectBootstrapper(); IKernel kernel = bootstrapper.CallCreateKernel(); Assert.IsNotNull(kernel); Assert.IsInstanceOfType(kernel, typeof(IKernel)); }
public void RegisterFrameworkExceptionTypesShouldRegisterActivationException() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.CallRegisterFrameworkExceptionTypes(); Assert.IsTrue(ExceptionExtensions.IsFrameworkExceptionRegistered( typeof(ActivationException))); }
public void CreateKernelShouldInitializeKernel() { var bootstrapper = new DefaultNinjectBootstrapper(); IKernel kernel = bootstrapper.CallCreateKernel(); Assert.NotNull(kernel); Assert.IsAssignableFrom <IKernel>(kernel); }
public void RunShouldLogAboutRegisteringFrameworkExceptionTypes() { const string expectedMessageText = "Registering Framework Exception Types."; var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.IsTrue(messages.Contains(expectedMessageText)); }
public void RunShouldLogAboutConfiguringRegionBehaviors() { const string expectedMessageText = "Configuring default region behaviors."; var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.IsTrue(messages.Contains(expectedMessageText)); }
public void ConfigureKernelAddsLoggerFacadeToKernel() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var returnedCatalog = bootstrapper.Kernel.Get <ILoggerFacade>(); Assert.IsNotNull(returnedCatalog); }
public void RunShouldLogAboutConfiguringViewModelLocator() { const string expectedMessageText = "Configuring the ViewModelLocator to use Ninject."; var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.IsTrue(messages.Contains(expectedMessageText)); }
public void RunShouldLogAboutConfiguringModuleCatalog() { const string expectedMessageText = "Configuring module catalog."; var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.IsTrue(messages.Contains(expectedMessageText)); }
public void RunShouldLogAboutCreatingTheShell() { const string expectedMessageText = "Creating the shell."; var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.IsTrue(messages.Contains(expectedMessageText)); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); ThemeManager.ApplicationThemeName = Theme.Office2013Name; var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); }
public void RunShouldLogLoggerCreationSuccess() { const string expectedMessageText = "Logger was created successfully."; var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.IsTrue(messages.Contains(expectedMessageText)); }
public void RunShouldLogAboutConfiguringKernel() { const string expectedMessageText = "Configuring the Ninject kernel."; var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.True(messages.Contains(expectedMessageText)); }
public void RunAddsCompositionKernelToKernel() { var bootstrapper = new DefaultNinjectBootstrapper(); var createdKernel = bootstrapper.CallCreateKernel(); var returnedKernel = createdKernel.Get <IKernel>(); Assert.IsNotNull(returnedKernel); Assert.AreEqual(typeof(StandardKernel), returnedKernel.GetType()); }
public void RunShouldLogAboutRunCompleting() { const string expectedMessageText = "Bootstrapper sequence completed."; var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.IsTrue(messages.Contains(expectedMessageText)); }
public void RunShouldLogAboutInitializingModules() { const string expectedMessageText = "Initializing modules."; var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.IsTrue(messages.Contains(expectedMessageText)); }
public void ConfigureKernelAddsModuleCatalogToKernel() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var returnedCatalog = bootstrapper.Kernel.Get <IModuleCatalog>(); Assert.IsNotNull(returnedCatalog); Assert.IsTrue(returnedCatalog is ModuleCatalog); }
public void RunShouldNotLogAboutInitializingTheShellIfShellIsNotCreated() { const string expectedMessageText = "Initializing shell"; var bootstrapper = new DefaultNinjectBootstrapper { ShellObject = null }; bootstrapper.Run(); var messages = bootstrapper.BaseLogger.Messages; Assert.IsFalse(messages.Contains(expectedMessageText)); }
public void ConfigureKernelAddsNavigationTargetHandlerToKernel() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var actual1 = bootstrapper.Kernel.Get <IRegionNavigationContentLoader>(); var actual2 = bootstrapper.Kernel.Get <IRegionNavigationContentLoader>(); Assert.IsNotNull(actual1); Assert.IsNotNull(actual2); Assert.AreSame(actual1, actual2); }
public void ConfigureKernelAddsRegionNavigationServiceToKernel() { var bootstrapper = new DefaultNinjectBootstrapper(); bootstrapper.Run(); var actual1 = bootstrapper.Kernel.Get <IRegionNavigationService>(); var actual2 = bootstrapper.Kernel.Get <IRegionNavigationService>(); Assert.IsNotNull(actual1); Assert.IsNotNull(actual2); Assert.AreNotSame(actual1, actual2); }