private string GenerateCommandLineCommands(ActivityContext context, string outputFolder, string additionalArguments)
        {
            SimpleCommandLineBuilder builder = new SimpleCommandLineBuilder();

            builder.AppendSwitchIfNotNull("-x=", this.TestAssembly.Get(context));
            builder.AppendSwitchIfNotNull("-r=", Path.Combine(outputFolder, this.OutputXmlFile.Get(context)));
            builder.AppendSwitch(additionalArguments);

            return builder.ToString();
        }
Example #2
0
        private string GenerateCommandLineCommands(ActivityContext context, string outputFolder)
        {
            SimpleCommandLineBuilder builder = new SimpleCommandLineBuilder();
            builder.AppendSwitch("/nologo");
            if (this.NoShadow.Get(context))
            {
                builder.AppendSwitch("/noshadow");
            }

            if (this.NoThread.Get(context))
            {
                builder.AppendSwitch("/nothread");
            }

            if (this.Labels.Get(context))
            {
                builder.AppendSwitch("/labels");
            }

            builder.AppendFileNamesIfNotNull(this.Assemblies.Get(context).ToArray(), " ");
            builder.AppendSwitchIfNotNull("/run=", this.Run.Get(context));
            builder.AppendSwitchIfNotNull("/config=", this.Configuration.Get(context));
            if (!string.IsNullOrEmpty(context.GetValue(this.IncludeCategory)))
            {
                builder.AppendSwitchIfNotNull("/include=", this.IncludeCategory.Get(context));
            }

            if (!string.IsNullOrEmpty(context.GetValue(this.ExcludeCategory)))
            {
                builder.AppendSwitchIfNotNull("/exclude=", this.ExcludeCategory.Get(context));
            }

            builder.AppendSwitchIfNotNull("/process=", this.Process.Get(context));
            builder.AppendSwitchIfNotNull("/domain=", this.Domain.Get(context));
            builder.AppendSwitchIfNotNull("/framework=", this.Framework.Get(context));
            builder.AppendSwitchIfNotNull("/xml=", Path.Combine(outputFolder, this.OutputXmlFile.Get(context)));
            builder.AppendSwitchIfNotNull("/err=", this.ErrorOutputFile.Get(context));
            builder.AppendSwitchIfNotNull("/out=", this.OutputFile.Get(context));

            if (this.TestTimeout.Get(this.ActivityContext) != null)
            {
                builder.AppendSwitch("/timeout=" + this.TestTimeout.Get(this.ActivityContext).ToString());
            }

            return builder.ToString();
        }