public void Run()
        {
            this.errorsOccured = false;
            TestRunner testRunner = new TestRunner(this.fileName);

            testRunner.TestCompleted += new EventHandler(TestRunnerTestCompleted);
            testRunner.ExecutionCompleted += new EventHandler(TestRunnerExecutionCompleted);

            testRunner.Load();
            testRunner.Execute();
        }
        public void ReflectionExecutesComExecaoDeSucesso()
        {
            string dllpath = System.IO.Path.Combine(System.Environment.CurrentDirectory, "WaxRunnerTest.dll");
            TestRunner testRunner = new TestRunner(dllpath);
            testRunner.Load();
            testRunner.Progress += new EventHandler<TestProgressEventArgs>(TestRunnerProgress);

            this.progressHandlerCalledCount = 0;

            testRunner.Execute();

            Assert.AreEqual(3, this.progressHandlerCalledCount, "The progress event was not fired the expected number of times.");
        }
        public void ProgressTest()
        {
            TestRunner testRunner = new TestRunner(FileName);
            testRunner.Load();

            testRunner.Progress += new EventHandler<TestProgressEventArgs>(TestRunnerProgress);

            this.progressHandlerCalledCount = 0;

            testRunner.ExecutionStarted += new EventHandler(testRunner_ExecutionStarted);
            testRunner.ExecutionCompleted += new EventHandler(testRunner_ExecutionCompleted);
            testRunner.TestCompleted += new EventHandler(testRunner_TestCompleted);
            testRunner.CommandCompleted += new EventHandler<CommandCompletedEventArgs>(testRunner_CommandCompleted);

            testRunner.Execute();

            Assert.AreEqual(3, this.progressHandlerCalledCount, "The progress event was not fired the expected number of times.");
            Assert.AreEqual(1, executionStartedCount);
            Assert.AreEqual(1, executionCompletedCount);
            Assert.AreEqual(2, testCompletedCount);
            Assert.AreEqual(3, commandCompletedCount);
        }
        public void LoadTestExcelErrorFile()
        {
            TestRunner testRunner = new TestRunner(excelErrorFile);
            testRunner.Load();
            testRunner.TestErrorOccured += new EventHandler<TestErrorEventArgs>(testRunner_TestErrorOccured);
            testRunner.TestStarted += new EventHandler(testRunner_TestStarted);
            testRunner.Execute();

            // Assert the number of tests loaded
            Assert.AreEqual(2, testRunner.Tests.Count, "Incorrect number of tests parsed");
            Assert.AreEqual(1, testErrorOccuredCount);
            Assert.AreEqual(1, testRunner.Errors.Count);
            Assert.AreEqual(true, testRunner.ErrorsOccured);
            Assert.AreEqual(2, testStartedCount);
        }