public static IExecuteActionsWhenRewiringForTesting ReplaceDocumentDb(this IExecuteActionsWhenRewiringForTesting @this, string dbToReplace, string replacementName = null) { return(@this.ReplaceComponent( componentName: dbToReplace, #pragma warning disable 618 replacement: Component.For <IDocumentDb, IResetTestDatabases>() #pragma warning restore 618 .ImplementedBy <InMemoryDocumentDb>() .LifestyleSingleton(), replacementName: replacementName)); }
public static IExecuteActionsWhenRewiringForTesting RegisterMessageHandlersFromAssemblyContainingType <TAssemblyIdentifier>(this IExecuteActionsWhenRewiringForTesting @this) { return(@this.Run(container => container.RegisterMessageHandlersFromAssemblyContainingType <TAssemblyIdentifier>())); }
public static IExecuteActionsWhenRewiringForTesting ReplaceDefault <TServiceType>(this IExecuteActionsWhenRewiringForTesting @this, ComponentRegistration <TServiceType> replacement) where TServiceType : class { return(@this.Run(container => container.ReplaceDefault(replacement))); }
public static IExecuteActionsWhenRewiringForTesting Register(this IExecuteActionsWhenRewiringForTesting @this, params IRegistration[] registrations) { return(@this.Run(container => container.Register(registrations))); }
public static IExecuteActionsWhenRewiringForTesting ReplaceComponent <TServiceType>(this IExecuteActionsWhenRewiringForTesting @this, string componentName, ComponentRegistration <TServiceType> replacement, string replacementName = null) where TServiceType : class { return(@this.Run(container => container.ReplaceComponent(componentName, replacement, replacementName))); }
public static IExecuteActionsWhenRewiringForTesting Run(this IExecuteActionsWhenRewiringForTesting @this, Action <IWindsorContainer> action) => @this.Execute(action);