コード例 #1
0
        public void Can_get_attribute_name_from_custom_entity()
        {
            var entity = new xts_entity();

            Assert.Equal("xts_entityid", Helper.Name <xts_entity>(e => e.Id));
            Assert.Equal("xts_entityid", entity.Name(e => e.Id));
            Assert.Equal("xts_column", Helper.Name <xts_entity>(e => e.xts_withcolumnattribute));
            Assert.Equal("xts_column", entity.Name(e => e.xts_withcolumnattribute));
            Assert.Equal("attributewithcasechar", Helper.Name <xts_entity>(e => e.AttributeWithCaseChar));
            Assert.Equal("attributewithcasechar", entity.Name(e => e.AttributeWithCaseChar));
        }