public void CreateModuleCatalogShouldInitializeModuleCatalog() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.CallCreateModuleCatalog(); Assert.IsNotNull(bootstrapper.BaseModuleCatalog); }
public void OnInitializedShouldRunLast() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.Run(); Assert.IsTrue(bootstrapper.ExtraInitialization); }
public void RegisterFrameworkExceptionTypesShouldRegisterActivationException() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.CallRegisterFrameworkExceptionTypes(); Assert.IsTrue(ExceptionExtensions.IsFrameworkExceptionRegistered( typeof(ActivationException))); }
public void CreateLoggerInitializesLogger() { var bootstrapper = new DefaultBootstrapper(); bootstrapper.CallCreateLogger(); Assert.IsNotNull(bootstrapper.BaseLogger); Assert.IsInstanceOfType(bootstrapper.BaseLogger, typeof(TextLogger)); }
public void ConfigureDefaultRegionBehaviorsShouldAddRegionLifetimeBehavior() { var bootstrapper = new DefaultBootstrapper(); CreateAndConfigureServiceLocatorWithDefaultRegionBehaviors(); bootstrapper.CallConfigureDefaultRegionBehaviors(); Assert.IsTrue(bootstrapper.DefaultRegionBehaviorTypes.ContainsKey(RegionMemberLifetimeBehavior.BehaviorKey)); }
public void ConfigureDefaultRegionBehaviorsShouldAddSyncRegionContextWithHostBehavior() { var bootstrapper = new DefaultBootstrapper(); CreateAndConfigureServiceLocatorWithDefaultRegionBehaviors(); bootstrapper.CallConfigureDefaultRegionBehaviors(); Assert.IsTrue(bootstrapper.DefaultRegionBehaviorTypes.ContainsKey(SyncRegionContextWithHostBehavior.BehaviorKey)); }
public void ConfigureDefaultRegionBehaviorsShouldBindRegionContextToDependencyObjectBehavior() { var bootstrapper = new DefaultBootstrapper(); CreateAndConfigureServiceLocatorWithDefaultRegionBehaviors(); bootstrapper.CallConfigureDefaultRegionBehaviors(); //Assert.IsTrue(bootstrapper.DefaultRegionBehaviorTypes.ContainsKey(BindRegionContextToDependencyObjectBehavior.BehaviorKey)); }
public void ConfigureDefaultRegionBehaviorsShouldAddSevenDefaultBehaviors() { var bootstrapper = new DefaultBootstrapper(); CreateAndConfigureServiceLocatorWithDefaultRegionBehaviors(); bootstrapper.CallConfigureDefaultRegionBehaviors(); Assert.AreEqual(7, bootstrapper.DefaultRegionBehaviorTypes.Count()); }
public void ConfigureRegionAdapterMappingsShouldRegisterSelectorMapping() { var bootstrapper = new DefaultBootstrapper(); CreateAndConfigureServiceLocatorWithRegionAdapters(); var regionAdapterMappings = bootstrapper.CallConfigureRegionAdapterMappings(); Assert.IsNotNull(regionAdapterMappings); //Assert.IsNotNull(regionAdapterMappings.GetMapping(typeof(Selector))); }
public void ConfigureViewModelLocatorShouldUserServiceLocatorAsResolver() { var bootstrapper = new DefaultBootstrapper(); CreateAndConfigureServiceLocatorForViewModelLocator(); bootstrapper.CallConfigureViewModelLocator(); var view = new MockView(); ViewModelLocationProvider.AutoWireViewModelChanged(view, (v, vm) => { Assert.IsNotNull(v); Assert.IsNotNull(vm); Assert.IsInstanceOfType(vm, typeof(MockViewModel)); }); }
public void ShellDefaultsToNull() { var bootstrapper = new DefaultBootstrapper(); Assert.IsNull(bootstrapper.BaseShell); }
public void ModuleCatalogDefaultsToNull() { var bootstrapper = new DefaultBootstrapper(); Assert.IsNull(bootstrapper.BaseModuleCatalog); }
public void LoggerDefaultsToNull() { var bootstrapper = new DefaultBootstrapper(); Assert.IsNull(bootstrapper.BaseLogger); }