예제 #1
0
        public void RunNUnitConsole()
        {
            var ctx           = ScenarioContext.Current.GetTestContext();
            var configuration = ctx.GetOrCreateNUnitConfiguration();
            var runner        = new NUnitRunner();
            ICommandLineSetupFactory setupFactory;

            switch (configuration.ConfigurationType)
            {
            case ConfigurationType.CmdArguments:
                setupFactory = new ArgumentsCommandLineSetupFactory();
                break;

            case ConfigurationType.ProjectFile:
                setupFactory = new ProjectCommandLineSetupFactory();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            var testSession = runner.Run(ctx, setupFactory.Create(ctx));

            ctx.TestSession = testSession;
        }
예제 #2
0
        private void NUnit2Test(List <FilePath> assemblies, FilePath outputFile, string excludeFilter)
        {
            var settings = new NUnitSettings
            {
                NoLogo      = true,
                NoResults   = IsInteractiveBuild,
                ResultsFile = outputFile,
                Exclude     = excludeFilter
            };

            var runner = new NUnitRunner(_fileSystem, _environment, _processRunner, _tools);

            runner.Run(assemblies, settings);
        }
예제 #3
0
        protected override void RunTool()
        {
            var tool = new NUnitRunner(FileSystem, Environment, ProcessRunner, Tools);

            tool.Run(Assemblies, Settings);
        }