Пример #1
0
        public void TestMultipleDispose()
        {
            CameraRGBAFrameData data = new CameraRGBAFrameData();
            data.Dispose();
            //Second call to dispose should do nothing
            data.Dispose();

            Assert.AreEqual(data.DataPointer, IntPtr.Zero);
        }
Пример #2
0
 public void TestConstrutor()
 {
     CameraRGBAFrameData data = new CameraRGBAFrameData();
     bool pass = data.DataPointer != IntPtr.Zero;
     data.Dispose();
     Assert.AreEqual(true, pass);
 }
Пример #3
0
 public void TestSize()
 {
     CameraRGBAFrameData data = new CameraRGBAFrameData();
     int expected = 512 * 424 * 16;
     bool pass = data.SizeInBytes == expected;
     data.Dispose();
     Assert.AreEqual(pass, true);
 }
Пример #4
0
        public void TestDisposeAccess()
        {
            CameraRGBAFrameData data = new CameraRGBAFrameData();
            data.Dispose();

            //Should throw exception
            var pointer = data.DataPointer;
        }
Пример #5
0
 public void TestDisposedSize()
 {
     CameraRGBAFrameData data = new CameraRGBAFrameData();
     data.Dispose();
     Assert.AreEqual(data.SizeInBytes, 0);
 }
Пример #6
0
 public void TestDispose()
 {
     CameraRGBAFrameData data = new CameraRGBAFrameData();
     data.Dispose();
     Assert.AreEqual(data.DataPointer, IntPtr.Zero);
 }