public void CheckSetting(string option, string key, object value) { var options = new NUnitLiteOptions("test.dll", option); var settings = TextRunner.MakeRunSettings(options); Assert.That(settings.ContainsKey(key)); Assert.AreEqual(value, settings[key]); }
public void WhenSeedIsSpecified_RunSettingsIncludeIt() { var options = new NUnitLiteOptions("test.dll", "--seed=1234"); var settings = TextRunner.MakeRunSettings(options); Assert.That(settings.ContainsKey("RandomSeed")); Assert.AreEqual(1234, settings["RandomSeed"]); }
public void WhenWorkDirectoryIsSpecified_RunSettingsIncludeIt() { var options = new NUnitLiteOptions("test.dll", "--work=results"); var settings = TextRunner.MakeRunSettings(options); Assert.That(settings.ContainsKey("WorkDirectory")); Assert.AreEqual(Path.GetFullPath("results"), settings["WorkDirectory"]); }
public void WhenTimeoutIsSpecified_RunSettingsIncludeIt() { var options = new NUnitLiteOptions("test.dll", "--timeout=50"); var settings = TextRunner.MakeRunSettings(options); Assert.That(settings.ContainsKey("DefaultTimeout")); Assert.AreEqual(50, settings["DefaultTimeout"]); }
public void WhenWorkersIsSpecified_RunSettingsIncludeIt() { var options = new NUnitLiteOptions("test.dll", "--workers=8"); var settings = TextRunner.MakeRunSettings(options); Assert.That(settings.ContainsKey("NumberOfTestWorkers")); Assert.AreEqual(8, settings["NumberOfTestWorkers"]); }
private static ITest GetITest(Assembly assembly, string commandLineOptions) { // we should control what `options` holds var options = new NUnitLiteOptions(commandLineOptions.Split(' ')); var builder = new DefaultTestAssemblyBuilder(); var runSettings = TextRunner.MakeRunSettings(options); return(builder.Build(assembly, runSettings)); }