public void TestMultipleDispose() { CameraRGBAFrameData data = new CameraRGBAFrameData(); data.Dispose(); //Second call to dispose should do nothing data.Dispose(); Assert.AreEqual(data.DataPointer, IntPtr.Zero); }
public void TestConstrutor() { CameraRGBAFrameData data = new CameraRGBAFrameData(); bool pass = data.DataPointer != IntPtr.Zero; data.Dispose(); Assert.AreEqual(true, pass); }
public void TestSize() { CameraRGBAFrameData data = new CameraRGBAFrameData(); int expected = 512 * 424 * 16; bool pass = data.SizeInBytes == expected; data.Dispose(); Assert.AreEqual(pass, true); }
public void TestDisposeAccess() { CameraRGBAFrameData data = new CameraRGBAFrameData(); data.Dispose(); //Should throw exception var pointer = data.DataPointer; }
public void TestDisposedSize() { CameraRGBAFrameData data = new CameraRGBAFrameData(); data.Dispose(); Assert.AreEqual(data.SizeInBytes, 0); }
public void TestDispose() { CameraRGBAFrameData data = new CameraRGBAFrameData(); data.Dispose(); Assert.AreEqual(data.DataPointer, IntPtr.Zero); }