public static int RunAllTests() { var executingAssembly = Assembly.GetExecutingAssembly(); var assemblyFilename = executingAssembly.Location; var consoleOut = Console.Out; var testPackage = new TestPackage(assemblyFilename) { AutoBinPath = true }; testPackage.Settings["ShadowCopyFiles"] = false; testPackage.Settings["UseThreadedRunner"] = false; var listener = new SledEventListener { ConsoleOut = consoleOut }; var testRunner = new RemoteTestRunner(); testRunner.Load(testPackage); testRunner.Run(listener); if (listener.FailedTestCount == 0) { consoleOut.WriteLine("Success: " + listener.TestCount + " test(s) passed."); } return(listener.FailedTestCount); }
public static int RunAllTests() { var executingAssembly = Assembly.GetExecutingAssembly(); var assemblyFilename = executingAssembly.Location; var consoleOut = Console.Out; var testPackage = new TestPackage(assemblyFilename) {AutoBinPath = true}; testPackage.Settings["ShadowCopyFiles"] = false; testPackage.Settings["UseThreadedRunner"] = false; var listener = new SledEventListener {ConsoleOut = consoleOut}; var testRunner = new RemoteTestRunner(); testRunner.Load(testPackage); testRunner.Run(listener); if (listener.FailedTestCount == 0) consoleOut.WriteLine("Success: " + listener.TestCount + " test(s) passed."); return listener.FailedTestCount; }