Contains test implementations for TPL schedulers.
Exemplo n.º 1
0
        /// <summary>
        /// Replaces the <see cref="ContextSpecificationBase.PreTestFixtureSetUp"/> method to set the <see cref="TplTestPlatformHelper.TestTaskScheduler"/> as the default scheduler.
        /// </summary>
        /// <param name="contextSpecification">
        /// The target context specification instance.
        /// </param>
        private void SetupTestTaskScheduler(IContextSpecification contextSpecification)
        {
            var testTaskScheduler = new TplTestPlatformHelper.TestTaskScheduler(this.ExecuteTplTasks);

            TplTestPlatformHelper.SetDefaultScheduler(testTaskScheduler);
        }
Exemplo n.º 2
0
        protected virtual void PreTestFixtureSetUp()
        {
            this.ThrownException = null;

            TplTestPlatformHelper.SetDefaultScheduler(new TplTestPlatformHelper.InvalidTaskScheduler());
        }