public void WaitCommandWithPortThrowsArgumentException() { var ex = Assert.Throws <ArgumentException>(() => TestableCommandLine.Parse("assemblyName.dll", "-wait-command")); Assert.Equal("when specifing --wait-command you must also pass a port using --port", ex.Message); }
public void NoReporters_UsesDefaultReporter() { var commandLine = TestableCommandLine.Parse("assemblyName.dll"); Assert.IsType <DefaultRunnerReporterWithTypes>(commandLine.Reporter); }
public static void ValidValues(string value, int expected) { var commandLine = TestableCommandLine.Parse("assemblyName.dll", "-port", value); Assert.Equal(expected, commandLine.Port); }
public void SetsMaxParallelThreads() { var commandLine = TestableCommandLine.Parse("assemblyName.dll", "-maxthreads", "16"); Assert.Equal(16, commandLine.MaxParallelThreads); }
public static void ValidValues(string value, int expected) { var commandLine = TestableCommandLine.Parse("assemblyName.dll", "-maxthreads", value); Assert.Equal(expected, commandLine.MaxParallelThreads); }
public static void MissingValue() { var ex = Assert.Throws <ArgumentException>(() => TestableCommandLine.Parse("assemblyName.dll", "-maxthreads")); Assert.Equal("missing argument for -maxthreads", ex.Message); }
public void ParallelCanBeTurnedOn() { var project = TestableCommandLine.Parse("assemblyName.dll", "-parallel"); Assert.True(project.Parallel); }
public static void ValidValues(string value, AppDomainSupport expected) { var commandLine = TestableCommandLine.Parse("assemblyName.dll", "-appdomains", value); Assert.Equal(expected, commandLine.AppDomains); }
public static void AssemblyFilePresentDoesNotThrow() { var arguments = new[] { "assemblyName.dll" }; TestableCommandLine.Parse(arguments); // Should not throw }
public static void DefaultValueIsNull() { var commandLine = TestableCommandLine.Parse("assemblyName.dll"); Assert.Null(commandLine.AppDomains); }
public static void InvalidValue() { var ex = Assert.Throws <ArgumentException>(() => TestableCommandLine.Parse("assemblyName.dll", "-appdomains", "foo")); Assert.Equal("incorrect argument value for -appdomains (must be 'ifavailable', 'required', or 'denied')", ex.Message); }
public void NoReporters_UsesDefaultReporter() { var commandLine = TestableCommandLine.Parse("no-config.json"); Assert.IsType <DefaultRunnerReporter>(commandLine.Reporter); }
public static void Unlimited_SetsToZero() { var commandLine = TestableCommandLine.Parse("assemblyName.dll", "-maxthreads", "unlimited"); Assert.Equal(0, commandLine.MaxParallelThreads); }
public static void Default_SetsToNull() { var commandLine = TestableCommandLine.Parse("assemblyName.dll", "-maxthreads", "default"); Assert.Null(commandLine.MaxParallelThreads); }
public static void DefaultValueIsFalse() { var commandLine = TestableCommandLine.Parse("assemblyName.dll"); Assert.False(commandLine.WaitCommand); }
public void DefaultValueIsZero() { var commandLine = TestableCommandLine.Parse("assemblyName.dll"); Assert.Equal(0, commandLine.MaxParallelThreads); }
public static void DefaultValueIsNull() { var commandLine = TestableCommandLine.Parse("assemblyName.dll"); Assert.Null(commandLine.MaxParallelThreads); }
public void InvalidValue() { var ex = Assert.Throws <ArgumentException>(() => TestableCommandLine.Parse("assemblyName.dll", "-maxthreads", "abc")); Assert.Equal("incorrect argument value for -maxthreads", ex.Message); }
public static void InvalidValues(string value) { var ex = Assert.Throws <ArgumentException>(() => TestableCommandLine.Parse("assemblyName.dll", "-maxthreads", value)); Assert.Equal("incorrect argument value for -maxthreads (must be 'default', 'unlimited', or a positive number)", ex.Message); }
public void ParallelIsOffByDefault() { var project = TestableCommandLine.Parse("assemblyName.dll"); Assert.False(project.Parallel); }