コード例 #1
0
        public void PropertyFromPropertyName()
        {
            var expected = "string";
            var instance = new BasicClass {
                Test = expected
            };

            var data = PropertyMetadataHelper.GetPropertyMetadata(instance.GetType(), "Test");

            Assert.IsNotNull(data);
            Assert.AreEqual(nameof(BasicClass.Test), data.PropertyName);
            Assert.AreEqual(expected, data.Getter(instance));
        }