示例#1
0
        public void IgnorePropertyBuilder_should_ignore_link_property()
        {
            var obj      = new Class1();
            var propInfo = typeof(Class1).GetProperty("link");
            var builder  = new IgnorePropertyBuilder(Mock.Of <IPropertyInfoMetadataLookup>());

            Assert.IsTrue(builder.BuildProperty(obj, propInfo));
            Assert.IsNull(obj.link);
        }
示例#2
0
        public void IgnorePropertyBuilder_should_ignore_etag_property()
        {
            var obj      = new Class1();
            var propInfo = typeof(Class1).GetProperty("_etag");
            var builder  = new IgnorePropertyBuilder(Mock.Of <IPropertyInfoMetadataLookup>());

            Assert.IsTrue(builder.BuildProperty(obj, propInfo));
            Assert.IsTrue(string.IsNullOrEmpty(obj._etag));
        }