public void ShouldGenerateCommandLineParametersFromOptionsWithoutLogFormatWhenNotFound() { ITaskLogFactory myLogger = new Mock<ITaskLogFactory>().Object; var translator = new LogOptionCommandLineTranslator(LogFactoryRegistry); var bounce = new FakeBounce(); bounce.LogFactory = myLogger; bounce.LogOptions.DescribeTasks = true; bounce.LogOptions.CommandOutput = false; bounce.LogOptions.LogLevel = LogLevel.Warning; var commandLine = translator.GenerateCommandLine(bounce); Assert.That(commandLine, ContainsArgument("/describe-tasks:true")); Assert.That(commandLine, ContainsArgument("/loglevel:warning")); Assert.That(commandLine, ContainsArgument("/command-output:false")); Assert.That(commandLine, Is.Not.StringMatching(@"(^|\s)/logformat:")); }
public void ShouldGenerateCommandLineParametersFromOptionsWithoutLogFormatWhenNotFound() { ITaskLogFactory myLogger = new Mock <ITaskLogFactory>().Object; var translator = new LogOptionCommandLineTranslator(LogFactoryRegistry); var bounce = new FakeBounce(); bounce.LogFactory = myLogger; bounce.LogOptions.DescribeTasks = true; bounce.LogOptions.CommandOutput = false; bounce.LogOptions.LogLevel = LogLevel.Warning; var commandLine = translator.GenerateCommandLine(bounce); Assert.That(commandLine, ContainsArgument("/describe-tasks:true")); Assert.That(commandLine, ContainsArgument("/loglevel:warning")); Assert.That(commandLine, ContainsArgument("/command-output:false")); Assert.That(commandLine, Is.Not.StringMatching(@"(^|\s)/logformat:")); }
public void ShouldGenerateCommandLineParametersFromOptions() { ITaskLogFactory myLogger = new Mock<ITaskLogFactory>().Object; LogFactoryRegistry.RegisterLogFactory("mylogger", myLogger); var translator = new LogOptionCommandLineTranslator(LogFactoryRegistry); var bounce = new FakeBounce(); bounce.LogFactory = myLogger; bounce.LogOptions.DescribeTasks = true; bounce.LogOptions.CommandOutput = false; bounce.LogOptions.LogLevel = LogLevel.Warning; var commandLine = translator.GenerateCommandLine(bounce); Assert.That(commandLine, ContainsArgument("/describe-tasks:true")); Assert.That(commandLine, ContainsArgument("/loglevel:warning")); Assert.That(commandLine, ContainsArgument("/command-output:false")); Assert.That(commandLine, ContainsArgument("/logformat:mylogger")); }
public void ShouldGenerateCommandLineParametersFromOptions() { ITaskLogFactory myLogger = new Mock <ITaskLogFactory>().Object; LogFactoryRegistry.RegisterLogFactory("mylogger", myLogger); var translator = new LogOptionCommandLineTranslator(LogFactoryRegistry); var bounce = new FakeBounce(); bounce.LogFactory = myLogger; bounce.LogOptions.DescribeTasks = true; bounce.LogOptions.CommandOutput = false; bounce.LogOptions.LogLevel = LogLevel.Warning; var commandLine = translator.GenerateCommandLine(bounce); Assert.That(commandLine, ContainsArgument("/describe-tasks:true")); Assert.That(commandLine, ContainsArgument("/loglevel:warning")); Assert.That(commandLine, ContainsArgument("/command-output:false")); Assert.That(commandLine, ContainsArgument("/logformat:mylogger")); }