public void ContainerRegistrationTest() { BootStrapperTestsHelper.CheckThatNumberOfResolvedServicesAre <IWindsorContainer>(1); BootStrapperTestsHelper.CheckThatResolvedServiceIsOfInstanceType <IWindsorContainer, WindsorContainer>(); BootStrapperTestsHelper.CheckThatResolvedServiceHasSingletonLifeCycle <IWindsorContainer>(); using (var bootStrapper = new BootStrapper()) { var target = bootStrapper.Container.Resolve <IWindsorContainer>(); Assert.AreEqual(bootStrapper.Container.GetHashCode(), target.GetHashCode(), string.Format("Instance of service '{0}' is not the same.", typeof(IWindsorContainer))); } }
public void MainWindowRegistrationTest() { BootStrapperTestsHelper.CheckThatNumberOfResolvedServicesAre <MainWindow>(1); BootStrapperTestsHelper.CheckThatResolvedServiceIsOfInstanceType <MainWindow, MainWindow>(); BootStrapperTestsHelper.CheckThatResolvedServiceHasSingletonLifeCycle <MainWindow>(); using (var bootStrapper = new BootStrapper()) { var target = bootStrapper.Container.ResolveAll <MainWindow>(); Assert.IsNotNull(target[0].ViewModel, "View was null"); } }
public void LoggingConfigurationRegistrationTest() { BootStrapperTestsHelper.CheckThatNumberOfResolvedServicesAre <ILoggingConfiguration>(1); BootStrapperTestsHelper.CheckThatResolvedServiceIsOfInstanceType <ILoggingConfiguration, LoggingConfiguration>(); BootStrapperTestsHelper.CheckThatResolvedServiceHasSingletonLifeCycle <ILoggingConfiguration>(); }
public void MainWindowViewModelRegistrationTest() { BootStrapperTestsHelper.CheckThatNumberOfResolvedServicesAre <MainWindowViewModel>(1); BootStrapperTestsHelper.CheckThatResolvedServiceIsOfInstanceType <MainWindowViewModel, MainWindowViewModel>(); BootStrapperTestsHelper.CheckThatResolvedServiceHasSingletonLifeCycle <MainWindowViewModel>(); }
public static void WindowsExplorerContextMenuInstallerRegistrationTest() { BootStrapperTestsHelper.CheckThatNumberOfResolvedServicesAre <IWindowsExplorerContextMenuInstaller>(1); BootStrapperTestsHelper.CheckThatResolvedServiceIsOfInstanceType <IWindowsExplorerContextMenuInstaller, WindowsExplorerContextMenuInstaller>(); BootStrapperTestsHelper.CheckThatResolvedServiceHasSingletonLifeCycle <IWindowsExplorerContextMenuInstaller>(); }
public void DebugLogAspectRegistrationTest() { BootStrapperTestsHelper.CheckThatNumberOfResolvedServicesAre <DebugLogAspect>(1); BootStrapperTestsHelper.CheckThatResolvedServiceIsOfInstanceType <DebugLogAspect, DebugLogAspect>(); BootStrapperTestsHelper.CheckThatResolvedServiceHasSingletonLifeCycle <DebugLogAspect>(); }
public void InvocationLogStringBuilderRegistrationTest() { BootStrapperTestsHelper.CheckThatNumberOfResolvedServicesAre <IInvocationLogStringBuilder>(1); BootStrapperTestsHelper.CheckThatResolvedServiceIsOfInstanceType <IInvocationLogStringBuilder, InvocationLogStringBuilder>(); }
public void NCmdLinerIApplicationInfoRegistrationTest() { BootStrapperTestsHelper.CheckThatNumberOfResolvedServicesAre <IApplicationInfo>(1); BootStrapperTestsHelper.CheckThatResolvedServiceIsOfInstanceType <IApplicationInfo, ApplicationInfo>(); BootStrapperTestsHelper.CheckThatResolvedServiceHasSingletonLifeCycle <IApplicationInfo>(); }
public void NCmdLinerIMessengerRegistrationTest() { BootStrapperTestsHelper.CheckThatNumberOfResolvedServicesAre <IMessenger>(1); BootStrapperTestsHelper.CheckThatResolvedServiceIsOfInstanceType <IMessenger, NotepadMessenger>(); BootStrapperTestsHelper.CheckThatResolvedServiceHasSingletonLifeCycle <IMessenger>(); }
public void TypeMapperRegistrationTest() { BootStrapperTestsHelper.CheckThatNumberOfResolvedServicesAre <ITypeMapper>(1); BootStrapperTestsHelper.CheckThatResolvedServiceIsOfInstanceType <ITypeMapper, TypeMapper>(); BootStrapperTestsHelper.CheckThatResolvedServiceHasSingletonLifeCycle <ITypeMapper>(); }