public void DisposeNativeResourcesDisposed_Finalize() { var nativeResourcesDisposed = false; CreateDisposableInstance(null, () => nativeResourcesDisposed = true); GCHelper.TriggerGC(); Assert.True(nativeResourcesDisposed); }
public void DisposeManagedResources_Finalize() { var managedResourcesDisposed = false; CreateDisposableInstance(() => managedResourcesDisposed = true, null); GCHelper.TriggerGC(); Assert.False(managedResourcesDisposed); }