public static IArrangeOrAssert <TSubject, TResult, TVars, TSequence> GivenUsing <TSubject, TResult, TVars, TSequence, TDisposable> ( this IArrange <TSubject, TResult, TVars, TSequence> arrange, Func <ITestContext <TSubject, TResult, TVars, TSequence>, TDisposable> scopeProvider) where TDisposable : IDisposable { return(arrange.GivenUsing(typeof(TDisposable).Name, scopeProvider)); }
public static IArrangeOrAssert <TSubject, TResult, TVars, TSequence> GivenUsing <TSubject, TResult, TVars, TSequence> ( this IArrange <TSubject, TResult, TVars, TSequence> arrange, string text, Action <ITestContext <TSubject, TResult, TVars, TSequence> > setup, Action <ITestContext <TSubject, TResult, TVars, TSequence> > cleanup) { return(arrange.GivenUsing(text, x => new DelegateScope(() => setup(x), () => cleanup(x)))); }
public static IArrangeOrAssert <TSubject, TResult, TVars, TSequence> GivenUsing <TSubject, TResult, TVars, TSequence> ( this IArrange <TSubject, TResult, TVars, TSequence> arrange, Type disposableType) { return(arrange.GivenUsing(disposableType.Name, x => disposableType.CreateInstance <IDisposable>())); }