Exemplo n.º 1
0
        public void isDisposed_ShouldReturnTrue_When_AlreadyDisposed()
        {
            var packet = new EglSurfaceHolderPacket();

            packet.Dispose();

            Assert.True(packet.isDisposed);
        }
Exemplo n.º 2
0
        public void Ctor_ShouldInstantiatePacket_When_CalledWithValue()
        {
            var eglSurfaceHolder = new EglSurfaceHolder();
            var packet           = new EglSurfaceHolderPacket(eglSurfaceHolder);

            Assert.True(eglSurfaceHolder.isDisposed);
            Assert.True(packet.ValidateAsType().ok);
            Assert.AreEqual(packet.Timestamp(), Timestamp.Unset());
        }
Exemplo n.º 3
0
        public void Get_ShouldReturnEglSurfaceHolder_When_DataIsNotEmpty()
        {
            var eglSurfaceHolder = new EglSurfaceHolder();

            eglSurfaceHolder.SetFlipY(true);
            var packet = new EglSurfaceHolderPacket(eglSurfaceHolder);
            var value  = packet.Get();

            Assert.False(value.OwnsResource());
            Assert.True(value.FlipY());
        }
Exemplo n.º 4
0
        public void Ctor_ShouldInstantiatePacket_When_CalledWithNoArguments()
        {
            var packet = new EglSurfaceHolderPacket();

            Assert.AreEqual(packet.ValidateAsType().code, Status.StatusCode.Internal);
        }
Exemplo n.º 5
0
        public void DebugTypeName_ShouldReturnFloat_When_ValueIsSet()
        {
            var packet = new EglSurfaceHolderPacket(new EglSurfaceHolder());

            Assert.AreEqual(packet.DebugTypeName(), "std::unique_ptr<mediapipe::EglSurfaceHolder, std::default_delete<mediapipe::EglSurfaceHolder> >");
        }
Exemplo n.º 6
0
        public void Get_ShouldThrowMediaPipeException_When_DataIsEmpty()
        {
            var packet = new EglSurfaceHolderPacket();

            Assert.Throws <MediaPipeException>(() => { packet.Get(); });
        }
Exemplo n.º 7
0
        public void isDisposed_ShouldReturnFalse_When_NotDisposedYet()
        {
            var packet = new EglSurfaceHolderPacket();

            Assert.False(packet.isDisposed);
        }