public void EditorFactoryTestCleanup() { editorPackage.Dispose(); editorPackage = null; editorFactory.Dispose(); editorFactory = null; }
public void DisposeTest() { EditorPackage target = editorPackage; Microsoft_Samples_VisualStudio_IDE_EditorWithToolbox_EditorPackageAccessor accessor = new Microsoft_Samples_VisualStudio_IDE_EditorWithToolbox_EditorPackageAccessor(target); accessor.editorFactory = new EditorFactory(); target.Dispose(); Assert.IsNull(accessor.editorFactory, "Internal Editor Factory object was not disposed properly."); }
/// <summary> /// Clean up any resources being used. /// </summary> protected virtual void Dispose(bool disposing) { if (disposing) { if (editorPackage != null) { editorPackage.Dispose(); editorPackage = null; } GC.SuppressFinalize(this); } }