Beispiel #1
0
        private bool ShallEnableInterClassParallelization(Assembly assembly, ITestFrameworkExecutionOptions executionOptions)
        {
            var attribute = assembly.GetCustomAttribute <CollectionBehaviorAttribute>();

            if (executionOptions.DisableParallelization() ?? attribute?.DisableTestParallelization ?? false)
            {
                return(false);
            }
            return(assembly.GetCustomAttribute <ClassCollectionBehaviorAttribute>()?.AllowTestParallelization ?? false);
        }
 /// <summary>
 /// Gets a flag to disable parallelization. If the flag is not present, returns the
 /// default value (<c>false</c>).
 /// </summary>
 public static bool DisableParallelizationOrDefault(this ITestFrameworkExecutionOptions executionOptions)
 {
     return(executionOptions.DisableParallelization() ?? false);
 }