public static void CanAccessContextFromNonWebThreadImpl() { IApplicationContext ctx; ctx = WebApplicationContext.GetRootContext(); AsyncTestMethod testMethod = new AsyncTestMethod(1, new AsyncTestMethod.TestMethod(DoBackgroundWork), ctx); testMethod.Start(); testMethod.AssertNoException(); }
public void CurrentProxyIsThreadSafe() { ProxyTestObjectAndExposeProxy(); AsyncTestMethod t1 = new AsyncTestMethod(1000, new ThreadStart(ProxyTestObjectAndExposeProxy)); AsyncTestMethod t2 = new AsyncTestMethod(1000, new ThreadStart(ProxyTestObjectAndExposeProxy)); t1.Start(); t2.Start(); t1.AssertNoException(); t2.AssertNoException(); }