Esempio n. 1
0
        /// <summary>
        /// Executes the action with specified console parameters
        /// </summary>
        /// <param name="args">application args</param>
        public void Execute(string[] args)
        {
            if (args[1] == null || args[1] == string.Empty)
            {
                console.WriteError("No arguments");
                DisplayInterface();
            }
            else
            {
                //skip the first two params, and go to the external attributes
                for (int i = 2; i < args.Length; i++)
                {
                    var command = Commands.Where(x => x.Key.ToUpper() == args[i].ToUpper()).FirstOrDefault();

                    if (command != null)
                    {
                        command.Execute(console, runner);
                    }
                }

                //Load the assembly and start testing baby!
                Assembly asm = Assembly.LoadFrom(args[1]);
                runner.RunTestOnAssembly(asm);

                console.WriteInfo("\n Tests passed: " + runner.Passed + "/" + (runner.Failed + runner.Passed));
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Executes the action with specified console parameters
        /// </summary>
        /// <param name="args">application args</param>
        public void Execute(string[] args)
        {
            if (args[1] == null || args[1] == string.Empty)
            {
                console.WriteError("No arguments");
                DisplayInterface();
            }
            else
            {
                for (int i = 2; i < args.Length; i++)
                {
                    var command = Commands.Where(x => x.Key.ToUpper() == args[i].ToUpper()).FirstOrDefault();

                    if (command != null)
                    {
                        command.Execute(console, runner);
                    }
                }

                Assembly asm = Assembly.LoadFile(args[1]);
                runner.RunTestOnAssembly(asm);

                console.WriteInfo("\n Tests passed: " + runner.Passed + "/" + (runner.Failed + runner.Passed));
            }
        }