コード例 #1
0
ファイル: TestProgram.cs プロジェクト: xiaobudian/sdk
    public static int Main(string[] args)
    {
        var newArgs = args.ToList();

        newArgs.Insert(0, typeof(Program).Assembly.Location);

        int returnCode = new Xunit.ConsoleClient.Program().EntryPoint(newArgs.ToArray());

        return(returnCode);
    }
コード例 #2
0
    public static int Main(string[] args)
    {
        var newArgs = TestCommandLine.HandleCommandLine(args, out bool showHelp);

        //  Help argument needs to be the first one to xunit, so don't insert assembly location in that case
        if (showHelp)
        {
            newArgs.Insert(0, "/?");
        }
        else
        {
            newArgs.Insert(0, typeof(Program).Assembly.Location);
        }

        int returnCode = new Xunit.ConsoleClient.Program().EntryPoint(newArgs.ToArray());

        if (showHelp)
        {
            TestCommandLine.ShowHelp();
        }

        return(returnCode);
    }