private static void AssertProcess(IProcess process, Xunit2Settings toolSettings)
        {
            process.AssertWaitForExit();
            switch (process.ExitCode)
            {
            case 0:
                break;

            case 1:
                ControlFlow.Fail("One or more of the tests failed.");
                break;

            case 2:
                ControlFlow.Fail(
                    "The help page was shown, either because it was requested, or because the user did not provide any command line arguments.");
                break;

            case 3:
                ControlFlow.Fail("There was a problem with one of the command line options passed to the runner.");
                break;

            case 4:
                ControlFlow.Fail(
                    "There was a problem loading one or more of the test assemblies (for example, if a 64-bit only assembly is run with the 32-bit test runner).");
                break;

            default:
                throw new NotSupportedException();
            }
        }
Example #2
0
 public static Xunit2Settings AddTargetAssemblies(this Xunit2Settings toolSettings, params string[] assemblyFiles)
 {
     return(toolSettings.AddTargetAssemblies(assemblyFiles.AsEnumerable()));
 }
Example #3
0
 public static Xunit2Settings AddTargetAssemblies(this Xunit2Settings toolSettings, IEnumerable <string> assemblyFiles)
 {
     return(assemblyFiles.Aggregate(
                toolSettings,
                (current, assembly) => current.AddTargetAssemblyWithConfigs(assembly, string.Empty)));
 }