public void Test_async_func_activity() { var a = new AsyncFuncActivity <int, int>(i => Task.FromResult(i), new Literal <int>(1)); var b = WorkflowInvoker.Invoke(a); Assert.AreEqual(1, b); }
public void Test_custom_scope() { var b = new AsyncFuncActivity <bool>(() => Task.FromResult((bool)CallContext.LogicalGetData("InTestExecutor") == true)); var a = new AsyncTaskExecutorScope <bool>(new TestAsyncTaskExecutor(), b); var o = WorkflowInvoker.Invoke(a); Assert.IsTrue(o); }
public void Test_default_scope() { var b = new AsyncFuncActivity <bool>(() => Task.FromResult(true)); var a = new AsyncTaskExecutorScope <bool>(null, b); var o = WorkflowInvoker.Invoke(a); Assert.IsTrue(o); }