Beispiel #1
0
        protected override IEnumerable <ITestCommand> EnumerateTestCommands(IMethodInfo method)
        {
            IEnumerable <ITestCommand> testCommands;
            StackTrace timedOutTrace;
            bool       succeded = ManualTimeout.TryExecuteWithTimeout(() => BaseEnumerateTestCommands(method), out testCommands, out timedOutTrace);

            if (!succeded)
            {
                return(ParameterGenerationTimedOutCommand.GetSingleCommand(method, timedOutTrace));
            }

            IEnumerable <CustomizingCommand> serialCommands = testCommands.Select(cmd => new CustomizingCommand(cmd));
            var repeatedCommands = Enumerable.Repeat(serialCommands, Repeat).SelectMany(s => s);

            return((!Debugger.IsAttached && Parallel) ? ParallelCommandGroup.WrapGroup(repeatedCommands) : repeatedCommands);
        }
 public static IEnumerable<ITestCommand> WrapGroup(IEnumerable<ITestCommand> commands)
 {
     var group = new ParallelCommandGroup(commands);
     return group.WrappedCommands;
 }
 public ParallelCommand(ITestCommand inner, ParallelCommandGroup parallelCommandGroup)
     : base(inner)
 {
     _parallelCommandGroup = parallelCommandGroup;
 }
        public static IEnumerable <ITestCommand> WrapGroup(IEnumerable <ITestCommand> commands)
        {
            var group = new ParallelCommandGroup(commands);

            return(group.WrappedCommands);
        }
 public ParallelCommand(ITestCommand inner, ParallelCommandGroup parallelCommandGroup)
     : base(inner)
 {
     _parallelCommandGroup = parallelCommandGroup;
 }