예제 #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;
 }
예제 #4
0
        public static IEnumerable <ITestCommand> WrapGroup(IEnumerable <ITestCommand> commands)
        {
            var group = new ParallelCommandGroup(commands);

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