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

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

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