public void Dispose() { try { if (IsPackageLoaded) { UnloadTests(); } if (Runner != null) { Runner.Dispose(); } if (TestEngine != null) { TestEngine.Dispose(); } if (_assemblyWatcher != null) { _assemblyWatcher.Dispose(); } if (_settingsService != null) { _settingsService.SaveSettings(); } } catch (NUnitEngineUnloadException) { // TODO: Figure out what to do about this } }
protected void Unload() { if (TestEngine != null) { TestEngine.Dispose(); TestEngine = null; } }
public void Dispose() { if (IsPackageLoaded) { UnloadTests(); } if (Runner != null) { Runner.Dispose(); } if (TestEngine != null) { TestEngine.Dispose(); } }
public void attribute_test() { var verificable = new DummyVerificable(new UInt160(new byte[20])); var snapshot = _system.GetSnapshot().CreateSnapshot(); using var testengine = new TestEngine(TriggerType.Application, verificable, snapshot: snapshot); Assert.IsTrue(testengine.AddEntryScript("./TestClasses/Contract_Attribute.cs").Success); var result = testengine.ExecuteTestCaseStandard("test"); Assert.AreEqual(1, result.Count); var item = result.Pop(); Assert.IsTrue(item.GetBoolean()); testengine.Reset(); verificable.Hashes = Array.Empty <UInt160>(); result = testengine.ExecuteTestCaseStandard("test"); Assert.AreEqual(VM.VMState.FAULT, testengine.State); Assert.AreEqual(0, result.Count); testengine.Dispose(); }
public void Dispose() { try { if (IsPackageLoaded) { UnloadTests(); } if (Runner != null) { Runner.Dispose(); } if (TestEngine != null) { TestEngine.Dispose(); } } catch (NUnitEngineUnloadException) { // TODO: Figure out what to do about this } }
public void Dispose() { CloseRunner(); TestEngine?.Dispose(); }
public new void Dispose() { _engine.Dispose(); base.Dispose(); }
public void Cleanup() { testEngine.Dispose(); }