Example #1
0
        private static object ExecuteTest(string[] args, Options options)
        {
            var type = Type.GetType(options.TestClassName);
            var method = type.GetMethod("Run");
            var paramValues = new object[] { args.Skip(2).ToArray() };

            var returnValue = method.Invoke(null, paramValues);

            return returnValue;
        }
Example #2
0
        static int Main(string[] args)
        {
            var options = new Options { };
            if (Parser.Default.ParseArgumentsStrict(args, options))
            {
                try
                {
                    var returnValue = ExecuteTest(args, options);
                    Console.WriteLine("Returned:  {0}", returnValue);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    return (int)ExitCode.UnknownError;
                }

                return (int)ExitCode.Success;

            }
            return (int)ExitCode.UnknownError; // Default to not known error
        }