public void WhenNoOptionsAreSpecified_PackageContainsNoSettings() { var options = new ConsoleOptions("test.dll"); var package = ConsoleRunner.MakeTestPackage(options); Assert.AreEqual(0, package.Settings.Count); }
public void WhenX86IsSpecified_PackageIncludesIt() { var options = new ConsoleOptions("test.dll", "--x86"); var package = ConsoleRunner.MakeTestPackage(options); Assert.IsTrue(package.GetSetting("RunAsX86", false)); }
public void WhenNoOptionsAreSpecified_PackageContainsOnlyTwoSettings() { var options = ConsoleMocks.Options("test.dll"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings.Keys, Is.EquivalentTo(new string[] { "WorkDirectory", "DisposeRunners" })); }
public void WhenDisposeIsSpecified_PackageIncludesIt() { var options = new ConsoleOptions("test.dll", "--dispose-runners"); var package = ConsoleRunner.MakeTestPackage(options); Assert.IsTrue(package.GetSetting("DisposeRunners", false)); }
public void WhenWorkersIsSpecified_PackageIncludesIt() { var options = new ConsoleOptions("test.dll", "--workers=3"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings.ContainsKey("NumberOfTestWorkers")); Assert.AreEqual(3, package.Settings["NumberOfTestWorkers"]); }
public void WhenSeedIsSpecified_PackageIncludesIt() { var options = new ConsoleOptions("test.dll", "--seed=1234"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings.ContainsKey("RandomSeed")); Assert.AreEqual(1234, package.Settings["RandomSeed"]); }
public void WhenTraceIsSpecified_PackageIncludesIt() { var options = new ConsoleOptions("test.dll", "--trace=Error"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings.ContainsKey("InternalTraceLevel")); Assert.AreEqual("Error", package.Settings["InternalTraceLevel"]); }
public void WhenDebugging_NumberOfTestWorkersDefaultsToZero() { var options = ConsoleMocks.Options("test.dll", "--debug"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings["DebugTests"], Is.EqualTo(true)); Assert.That(package.Settings["NumberOfTestWorkers"], Is.EqualTo(0)); }
public void SingleAssembly() { var options = ConsoleMocks.Options("test.dll"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.SubPackages.Count, Is.EqualTo(1)); Assert.That(package.SubPackages[0].FullName, Is.EqualTo(Path.GetFullPath("test.dll"))); }
public void WhenOptionIsSpecified_PackageIncludesSetting(string option, string key, object val) { var options = new ConsoleOptions("test.dll", option); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings.ContainsKey(key), "Setting not included for {0}", option); Assert.AreEqual(val, package.Settings[key], "NumberOfTestWorkers not set correctly for {0}", option); }
public void WhenDebugging_NumberOfTestWorkersMayBeOverridden() { var options = ConsoleMocks.Options("test.dll", "--debug", "--workers=3"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings["DebugTests"], Is.EqualTo(true)); Assert.That(package.Settings["NumberOfTestWorkers"], Is.EqualTo(3)); }
public void SingleAssembly() { var options = new ConsoleOptions("test.dll"); var package = ConsoleRunner.MakeTestPackage(options); Assert.AreEqual(1, package.SubPackages.Count); Assert.AreEqual(Path.GetFullPath("test.dll"), package.SubPackages[0].FullName); }
public void WhenConfigIsSpecified_PackageIncludesIt() { var options = new ConsoleOptions("test.dll", "--config=Release"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings.ContainsKey("ActiveConfig")); Assert.AreEqual("Release", package.Settings["ActiveConfig"]); }
public void WhenNoOptionsAreSpecified_PackageContainsWorkDirectorySettingOnly() { var options = new ConsoleOptions("test.dll"); var package = ConsoleRunner.MakeTestPackage(options); Assert.AreEqual(1, package.Settings.Count); Assert.That(package.Settings.Keys, Contains.Item("WorkDirectory")); }
public void WhenFrameworkIsSpecified_PackageIncludesIt() { var options = new ConsoleOptions("test.dll", "--framework=net-4.0"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings.ContainsKey("RuntimeFramework")); Assert.AreEqual("net-4.0", package.Settings["RuntimeFramework"]); }
public void WhenDomainUsageIsSpecified_PackageIncludesIt() { var options = new ConsoleOptions("test.dll", "--domain=Multiple"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings.ContainsKey("DomainUsage")); Assert.AreEqual("Multiple", package.Settings["DomainUsage"]); }
public void WhenProcessModelIsSpecified_PackageIncludesIt() { var options = new ConsoleOptions("test.dll", "--process=Separate"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings.ContainsKey("ProcessModel")); Assert.AreEqual("Separate", package.Settings["ProcessModel"]); }
public void WhenTimeoutIsSpecified_PackageIncludesIt() { var options = new ConsoleOptions("test.dll", "--timeout=50"); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.Settings.ContainsKey("DefaultTimeout")); Assert.AreEqual(50, package.Settings["DefaultTimeout"]); }
public void MultipleAssemblies() { var names = new [] { "test1.dll", "test2.dll", "test3.dll" }; var options = new ConsoleOptions(names); var package = ConsoleRunner.MakeTestPackage(options); Assert.AreEqual(3, package.SubPackages.Count); Assert.AreEqual(Path.GetFullPath("test1.dll"), package.SubPackages[0].FullName); Assert.AreEqual(Path.GetFullPath("test2.dll"), package.SubPackages[1].FullName); Assert.AreEqual(Path.GetFullPath("test3.dll"), package.SubPackages[2].FullName); }
public void MultipleAssemblies() { var names = new [] { "test1.dll", "test2.dll", "test3.dll" }; var options = ConsoleMocks.Options(names); var package = ConsoleRunner.MakeTestPackage(options); Assert.That(package.SubPackages.Count, Is.EqualTo(3)); Assert.That(package.SubPackages[0].FullName, Is.EqualTo(Path.GetFullPath("test1.dll"))); Assert.That(package.SubPackages[1].FullName, Is.EqualTo(Path.GetFullPath("test2.dll"))); Assert.That(package.SubPackages[2].FullName, Is.EqualTo(Path.GetFullPath("test3.dll"))); }
public void MultipleAssemblies() { var names = new [] { "test1.dll", "test2.dll", "test3.dll" }; var expected = new[] { Path.GetFullPath("test1.dll"), Path.GetFullPath("test2.dll"), Path.GetFullPath("test3.dll") }; var options = new ConsoleOptions(names); var package = ConsoleRunner.MakeTestPackage(options); Assert.AreEqual(expected, package.TestFiles); }