public void TestFuncAsync()
        {
            OcDispatcher dispatcher   = new OcDispatcher(2);
            object       returnObject = new object();
            InvocationResult <object> invocationResult = dispatcher.InvokeAsync(() => returnObject);

            dispatcher.Pass();
            Assert.AreEqual(invocationResult.Value, invocationResult.Value);
            Assert.AreEqual(invocationResult.ToString(), "(ObservableComputations.InvocationResult<Object> (Value = '(System.Object)'))");
            dispatcher.Dispose();
        }
        public void TestFuncAsyncState()
        {
            OcDispatcher dispatcher   = new OcDispatcher(2);
            TestValue    returnObject = new TestValue();
            InvocationResult <TestValue> invocationResult = dispatcher.InvokeAsync(s => returnObject, new object());
            bool propertyChanged = false;

            invocationResult.PropertyChanged += (sender, args) => propertyChanged = true;
            dispatcher.Pass();
            Assert.AreEqual(invocationResult.Value, returnObject);
            Assert.IsTrue(propertyChanged);
            Assert.AreEqual(invocationResult.ToString(), "(ObservableComputations.InvocationResult<TestValue> (Value = 'Mesasage'))");
            Assert.AreEqual(invocationResult.Invocation.Status, InvocationStatus.Executed);
            dispatcher.Dispose();
        }