Esempio n. 1
0
        private void UpdateProjectList()
        {
            var projectsPath = Path.GetFullPath(this.UnitTestProjectsPathTextBox.Text);

            if (!Directory.Exists(projectsPath))
            {
                return;
            }

            this.ProjectCheckedListBox.Items.Clear();
            var projectPaths = UnitTestRunner.FindAllZeroProj(projectsPath);

            foreach (var projectPath in projectPaths)
            {
                var projectInfo = new UnitTestProjectInfo();
                projectInfo.FullPath = projectPath;
                this.ProjectCheckedListBox.Items.Add(projectInfo, true);
            }
        }
Esempio n. 2
0
        private void RunTestsButton_Click(object sender, EventArgs e)
        {
            var args = new CommandArgs();

            args.ZeroExePath          = this.ZeroExePathTextBox.Text;
            args.UnitTestProjectsPath = this.UnitTestProjectsPathTextBox.Text;

            var projectsToRun = new List <string>();

            for (var i = 0; i < this.ProjectCheckedListBox.CheckedIndices.Count; ++i)
            {
                var checkedIndex = this.ProjectCheckedListBox.CheckedIndices[i];
                var projectInfo  = (UnitTestProjectInfo)this.ProjectCheckedListBox.Items[checkedIndex];
                projectsToRun.Add(projectInfo.FullPath);
            }

            this.LogResultsTextBox.Text = "";
            var unitTestRunner = new UnitTestRunner();

            unitTestRunner.mLoggingDelegate += this.LogProjectResult;
            unitTestRunner.RunProjects(args.ZeroExePath, projectsToRun, args.MaxTimeout);
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            var commandArgs = new CommandArgs();
            var settings    = new CommandLine.ParserSettings();

            settings.IgnoreUnknownArguments = false;
            CommandLine.Parser parser = new Parser(with => with.HelpWriter = Console.Error);

            // Try to parse the command line arguments
            if (parser.ParseArguments(args, commandArgs) == false)
            {
                // If we failed to parse print out the usage of this program
                //Console.Write(commandArgs.GetUsage());

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new UnitTestForm());
                return;
            }

            var unitTestRunner = new UnitTestRunner();

            unitTestRunner.Run(commandArgs);
        }