Ejemplo n.º 1
0
        private TestCommand ApplyDecoratorsToCommand(TestCommand command)
        {
            CommandDecoratorList decorators = new CommandDecoratorList();

            // Add Standard stuff
            decorators.Add(new SetUpTearDownDecorator());

#if !NUNITLITE && false
            if (ShouldRunOnOwnThread)
            {
                decorators.Add(new ThreadedTestDecorator());
            }
#endif

            // Add Decorators supplied by attributes and parameter sets
            foreach (ICommandDecorator decorator in CustomDecorators)
            {
                decorators.Add(decorator);
            }

            decorators.OrderByStage();

            foreach (ICommandDecorator decorator in decorators)
            {
                command = decorator.Decorate(command);
            }

            return(command);
        }
Ejemplo n.º 2
0
        private TestCommand ApplyDecoratorsToCommand(TestCommand command)
        {
            CommandDecoratorList decorators = new CommandDecoratorList();

            // Add Standard stuff
            decorators.Add(new SetUpTearDownDecorator());

            // Add Decorators supplied by attributes
            foreach (ICommandDecoratorSource source in Method.GetCustomAttributes(typeof(ICommandDecoratorSource), true))
            {
                foreach (ICommandDecorator decorator in source.GetDecorators())
                {
                    decorators.Add(decorator);
                }
            }

            // Add Decorators from the parameter set
            if (parms != null)
            {
                foreach (ICommandDecorator decorator in parms.GetDecorators())
                {
                    decorators.Add(decorator);
                }
            }

            decorators.OrderByStage();

            foreach (ICommandDecorator decorator in decorators)
            {
                command = decorator.Decorate(command);
            }

            return(command);
        }
        private TestCommand ApplyDecoratorsToCommand(TestCommand command)
        {
            CommandDecoratorList decorators = new CommandDecoratorList();

            // Add Standard stuff
            decorators.Add(new SetUpTearDownDecorator());

#if MONO
            decorators.Add(new FlakyTestRetriesDecorator());
#endif

            // Add Decorators supplied by attributes and parameter sets
            foreach (ICommandDecorator decorator in CustomDecorators)
            {
                decorators.Add(decorator);
            }

            decorators.OrderByStage();

            foreach (ICommandDecorator decorator in decorators)
            {
                command = decorator.Decorate(command);
            }

            return(command);
        }
Ejemplo n.º 4
0
        private TestCommand ApplyDecoratorsToCommand(TestCommand command)
        {
            CommandDecoratorList commandDecoratorList = new CommandDecoratorList();

            commandDecoratorList.Add(new SetUpTearDownDecorator());
            foreach (ICommandDecorator customDecorator in CustomDecorators)
            {
                commandDecoratorList.Add(customDecorator);
            }
            commandDecoratorList.OrderByStage();
            foreach (ICommandDecorator item in commandDecoratorList)
            {
                command = item.Decorate(command);
            }
            return(command);
        }
Ejemplo n.º 5
0
        private TestCommand ApplyDecoratorsToCommand(TestCommand command)
        {
            CommandDecoratorList decorators = new CommandDecoratorList();

            // Add Standard stuff
            decorators.Add(new SetUpTearDownDecorator());

            // Add Decorators supplied by attributes
            foreach (ICommandDecoratorSource source in Method.GetCustomAttributes(typeof(ICommandDecoratorSource), true))
                foreach (ICommandDecorator decorator in source.GetDecorators())
                    decorators.Add(decorator);

            // Add Decorators from the parameter set
            if (parms != null)
                foreach (ICommandDecorator decorator in parms.GetDecorators())
                    decorators.Add(decorator);

            decorators.OrderByStage();

            foreach (ICommandDecorator decorator in decorators)
            {
                command = decorator.Decorate(command);
            }

            return command;
        }
Ejemplo n.º 6
0
        private TestCommand ApplyDecoratorsToCommand(TestCommand command)
        {
            CommandDecoratorList decorators = new CommandDecoratorList();

            // Add Standard stuff
            decorators.Add(new SetUpTearDownDecorator());

            // Add Decorators supplied by attributes and parameter sets
            foreach (ICommandDecorator decorator in CustomDecorators)
                decorators.Add(decorator);

            decorators.OrderByStage();

            foreach (ICommandDecorator decorator in decorators)
            {
                command = decorator.Decorate(command);
            }

            return command;
        }