System.Reflection.Tests.PointerTests.PointerPropertyGetValue C# (CSharp) Method

PointerPropertyGetValue() private method

private PointerPropertyGetValue ( int value ) : void
value int
return void
        public void PointerPropertyGetValue(int value)
        {
            var obj = new PointerHolder();
            obj.Property = (char*)value;
            PropertyInfo property = typeof(PointerHolder).GetProperty("Property");
            object actualValue = property.GetValue(obj);
            Assert.IsType<Pointer>(actualValue);
            void* actualPointer = Pointer.Unbox(actualValue);
            Assert.Equal(value, (int)actualPointer);
        }