示例#1
0
        public void CancellableAction_UnitTest()
        {
            TimeSpan time   = default(TimeSpan);
            Action   action = default(Action);
            CancellationTokenSource _retVal = default(CancellationTokenSource);

            ExecuteMethod(
                () =>
            {
                time   = default(TimeSpan);   //No Constructor
                action = default(Action);     //No Constructor
                CancellableAction_PreCondition(ref time, ref action);
            },
                () => { _retVal = TaskHelpers.CancellableAction(time, action); },
                () => { CancellableAction_PostValidate(time, action, _retVal); });
        }