protected WhenExceptionInterceptingSynchronousResultMethodsBase(int msDelay) { // The delay is used to simulate work my the interceptor, thereof not always continuing on the same thread. var interceptor = new TestAsyncInterceptorBase(_log, msDelay); _proxy = ProxyGen.CreateProxy(_log, interceptor); }
public WhenProcessingSynchronousResultMethods(ITestOutputHelper output) { string randomValue = "randomValue_" + Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture); _log = new ListLogger(output); _interceptor = new TestProcessingAsyncInterceptor(_log, randomValue); _proxy = ProxyGen.CreateProxy(_log, _interceptor); }
protected WhenInterceptingAsynchronousResultMethodsBase( ITestOutputHelper output, bool asyncB4Proceed, int msDelayAfterProceed) { _log = new ListLogger(output); // The delay is used to simulate work my the interceptor, thereof not always continuing on the same thread. var interceptor = new TestAsyncInterceptorBase(_log, asyncB4Proceed, msDelayAfterProceed); _proxy = ProxyGen.CreateProxy(_log, interceptor); }
protected TimingAsynchronousResultMethodCompletedAndIncompleteBase(ITestOutputHelper output, bool alwaysCompleted) { _log = new ListLogger(output); IInterfaceToProxy AlwaysCompletedFactory() => new ClassWithAlwaysCompletedAsync(_log); IInterfaceToProxy AlwaysIncompleteFactory() => new ClassWithAlwaysIncompleteAsync(_log); _interceptor = new TestAsyncTimingInterceptor(_log); _proxy = ProxyGen.CreateProxy( alwaysCompleted ? AlwaysCompletedFactory : (Func <IInterfaceToProxy>)AlwaysIncompleteFactory, _interceptor); }
protected AsynchronousResultMethodCompletedAndIncompleteBase(ITestOutputHelper output, bool alwaysCompleted) { _log = new ListLogger(output); IInterfaceToProxy AlwaysCompletedFactory() => new ClassWithAlwaysCompletedAsync(_log); IInterfaceToProxy AlwaysIncompleteFactory() => new ClassWithAlwaysIncompleteAsync(_log); var interceptor = new TestAsyncInterceptorBase(_log, asyncB4Proceed: true, msDelayAfterProceed: 10); _proxy = ProxyGen.CreateProxy( alwaysCompleted ? AlwaysCompletedFactory : (Func <IInterfaceToProxy>)AlwaysIncompleteFactory, interceptor); }
public WhenProcessingSynchronousVoidMethods(ITestOutputHelper output) { _log = new ListLogger(output); _interceptor = new TestProcessingAsyncInterceptor(_log, "randomValue_" + Guid.NewGuid().ToString("N")); _proxy = ProxyGen.CreateProxy(_log, _interceptor); }
public WhenProcessingSynchronousResultMethodsWithTheReturnValue(ITestOutputHelper output) { _log = new ListLogger(output); _interceptor = new TestProcessingReturnValueAsyncInterceptor(_log); _proxy = ProxyGen.CreateProxy(_log, _interceptor); }
public WhenProcessingSynchronousResultMethodsWithTheReturnValue() { _interceptor = new TestProcessingReturnValueAsyncInterceptor(_log); _proxy = ProxyGen.CreateProxy(_log, _interceptor); }
public WhenInterceptingSynchronousVoidMethods(ITestOutputHelper output) { _log = new ListLogger(output); _proxy = ProxyGen.CreateProxy(_log, new TestAsyncInterceptor(_log)); }
public WhenTimingSynchronousResultMethods(ITestOutputHelper output) { _log = new ListLogger(output); _interceptor = new TestAsyncTimingInterceptor(_log); _proxy = ProxyGen.CreateProxy(_log, _interceptor); }
public WhenInterceptingSynchronousResultMethods() { _proxy = ProxyGen.CreateProxy(_log, new TestAsyncInterceptor(_log)); }
public WhenInterceptingAsynchronousResultMethods(ITestOutputHelper output) { _log = new ListLogger(output); _proxy = ProxyGen.CreateProxy(_log, new TestAsyncInterceptor(_log)); _proxyWithAwaitBefore = ProxyGen.CreateProxy(_log, new TestAsyncInterceptorWithAwaitBefore(_log, 200)); }
public WhenTimingSynchronousResultMethods() { _interceptor = new TestAsyncTimingInterceptor(_log); _proxy = ProxyGen.CreateProxy(_log, _interceptor); }
public WhenProcessingSynchronousResultMethods() { _interceptor = new TestProcessingAsyncInterceptor(_log, "randomValue_" + Guid.NewGuid().ToString("N")); _proxy = ProxyGen.CreateProxy(_log, _interceptor); }