protected override void CreateTestEngine() { if (this.domain == null) { throw new InvalidOperationException("AppDomain is a null reference"); } try { RemoteTestEngine te = null; try { te = (RemoteTestEngine) this.domain.CreateInstanceAndUnwrap( this.TestEngineType.Assembly.GetName().Name, this.TestEngineType.FullName ); } catch (Exception) { te = (RemoteTestEngine) this.domain.CreateInstanceFromAndUnwrap( this.TestEngineType.Assembly.GetName().Name + ".dll", this.TestEngineType.FullName ); } this.SetTestEngine(te); this.TestEngine.AddHintDirectory(Path.GetDirectoryName(typeof(SeparateTestDomain).Assembly.Location)); } catch (Exception ex) { throw new ApplicationException("Failed creating the TestEngine instance", ex); } }
protected virtual void SetTestEngine(RemoteTestEngine testEngine) { this.testEngine = testEngine; }
protected override void CreateTestEngine() { RemoteTestEngine te = Activator.CreateInstance(this.TestEngineType) as RemoteTestEngine; this.SetTestEngine(te); }