public RemoteTestEngine(IFixtureRunner fixtureRunner)
 {
     this.SetFixtureRunner(fixtureRunner);
     this.report = new ReportListener();
     this.resolver = new AssemblyResolverManager();
 }
 public virtual void Clear()
 {
     if (this.Explorer!=null)
         this.Explorer.FixtureGraph.Clear();
     if (this.report!=null)
         this.report.Clear();
     this.report = null;
     this.testAssembly = null;
 }
 public virtual void Dispose()
 {
     this.explorer = null;
     this.fixtureRunner = null;
     if (this.resolver != null)
     {
         this.resolver.Dispose();
         this.resolver = null;
     }
     this.report = null;
     this.testAssembly = null;
 }
Example #4
0
        public virtual void Run(
            FixtureExplorer explorer,
            ReportListener reportListener
            )
        {
            if (explorer == null)
                throw new ArgumentNullException("explorer");
            if (reportListener == null)
				throw new ArgumentNullException("reportListener");

            this.explorer = explorer;
            this.report = reportListener;
            this.abortPending = false;

            try
            {
                // start reporting
                this.Report.StartTests();

                if (this.IsAbortPending)
                    return;

                // assembly setup
                if (!this.RunAssemblySetUp())
                    return;

                if (this.IsAbortPending)
                    return;

                try
                {
                    RunFixtures();
                }
                finally
                {
                    this.RunAssemblyTearDown();
                }
            }
            catch (Exception ex)
            {
                ReportException rex = ReportException.FromException(ex);
                ReportExceptionException rexe = new ReportExceptionException(
                    "Internal error while running tests in " + 
                    this.Explorer.AssemblyName, rex);
                throw rexe;
            }
            finally
            {
                this.Report.FinishTests();

                this.explorer = null;
                this.report = null;
            }
        }