public void WithTargetDirectory(string baseOutputDirectory)
        {
            if (m_InTestRun) return;

            m_InTestRun = true;

            try
            {
                var reportFilePath = baseOutputDirectory + 
                    "\\Concordion\\Spec\\Concordion\\Configuration\\BaseOutputDirectory.html";
                if (File.Exists(reportFilePath))
                {
                    File.Delete(reportFilePath);
                }
                var specificationConfig = new SpecificationConfig().Load(this.GetType().Assembly);
                specificationConfig.BaseOutputDirectory = baseOutputDirectory;
                var testRunner = new DefaultConcordionRunner();
                var testResult = testRunner.Run(this, specificationConfig);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception during test execution: {0}", e);
            }
            finally
            {
                m_InTestRun = false;
            }
        }
        public bool EmbeddedExecuted()
        {
            if (m_InTestRun) return true;

            m_InTestRun = true;

            var specificationConfig = new SpecificationConfig().Load(this.GetType().Assembly);
            specificationConfig.BaseInputDirectory = null;
            var fixtureRunner = new DefaultConcordionRunner();
            var testResult = fixtureRunner.Run(this, specificationConfig);

            m_InTestRun = false;

            bool hasFailures = testResult.getFailureCount() == 0;
            bool hasExceptions = !testResult.hasExceptions();
            return hasFailures && hasExceptions;
        }
        public bool DirectoryBasedExecuted(string baseInputDirectory)
        {
            if (m_InTestRun) return true;

            m_InTestRun = true;

            //work around for problem of NUnit GUI runner
            baseInputDirectory = baseInputDirectory +
                                 Path.DirectorySeparatorChar +
                                 ".." +
                                 Path.DirectorySeparatorChar +
                                 this.GetType().Assembly.GetName().Name;

            var specificationConfig = new SpecificationConfig().Load(this.GetType().Assembly);
            specificationConfig.BaseInputDirectory = baseInputDirectory;
            var testRunner = new DefaultConcordionRunner();
            var testResult = testRunner.Run(this, specificationConfig);

            m_InTestRun = false;

            return testResult.getFailureCount() == 0 && !testResult.hasExceptions();
        }
        public override TestResult Run(EventListener listener, ITestFilter filter)
        {
            listener.TestStarted(this.TestName);

            Fixture = Reflect.Construct(m_FixtureType);
            RunFixtureSetUp();
            TestResult testResult;
            try
            {
                var testRunner = new DefaultConcordionRunner();
                var concordionResult = testRunner.Run(Fixture);
                testResult = NUnitTestResult(concordionResult, "");
            }
            catch (Exception exception)
            {
                testResult = new TestResult(this);
                testResult.Error(exception);
            }
            RunFixtureTearDown();

            listener.TestFinished(testResult);

            return testResult;
        }