Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 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))));
 }
Ejemplo n.º 3
0
 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>()));
 }