public void NotFailWhenMagicAPIErrorOccured() { var q = new APIObject(5); MagicAPI.Free(5); q.Dispose(); }
public void FreeResourcesInUsing() { using (var q = new APIObject(2)) { Assert.True(MagicAPI.Contains(2)); } Assert.False(MagicAPI.Contains(2)); }
public void FreeResourcesWhenDisposeCalled() { var q = new APIObject(1); Assert.True(MagicAPI.Contains(1)); q.Dispose(); Assert.False(MagicAPI.Contains(1)); }
public void DontFailWhenTwoDisposeAreCalled() { var q = new APIObject(3); Assert.True(MagicAPI.Contains(3)); q.Dispose(); q.Dispose(); Assert.False(MagicAPI.Contains(3)); }
void CreateAndDisposeApiObject(int n) { var q = new APIObject(n); q.Dispose(); }
void CreateApiObject(int n) { var q = new APIObject(n); }
void M() { var q = new APIObject(4); }