public void NullModuleEnumeratorThrowsOnDefaultModuleInitialization() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.ModuleEnumerator = null; AssertExceptionThrownOnRun(bootstrapper, typeof(InvalidOperationException), "IModuleCatalog"); }
public void NotOvewrittenGetModuleEnumeratorThrowsOnDefaultModuleInitialization() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.OverrideGetModuleEnumerator = false; AssertExceptionThrownOnRun(bootstrapper, typeof(InvalidOperationException), "IModuleCatalog"); }
public void NullLoggerThrows() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.ReturnNullDefaultLogger = true; AssertExceptionThrownOnRun(bootstrapper, typeof(InvalidOperationException), "ILoggerFacade"); }
public void GetLoggerShouldHaveDefault() { var bootstrapper = new DefaultBootstrapper(); Assert.IsNull(bootstrapper.DefaultLogger); bootstrapper.Run(); Assert.IsNotNull(bootstrapper.DefaultLogger); Assert.IsInstanceOfType(bootstrapper.DefaultLogger, typeof(TraceLogger)); }
public void ShouldCallConfigureTypeMappings() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ConfigureContainerCalled); }
public void CanRunBootstrapper() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.Run(); }
public void ShouldInitializeContainer() { var bootstrapper = new DefaultBootstrapper(); var container = bootstrapper.GetBaseContainer(); Assert.IsNull(container); bootstrapper.Run(); container = bootstrapper.GetBaseContainer(); Assert.IsNotNull(container); Assert.IsInstanceOfType(container, typeof(UnityContainer)); }
public void ShouldCallInitializeModules() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.InitializeModulesCalled); }
public void ShouldCallGetLogger() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.GetLoggerCalled); }