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

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

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