Пример #1
0
        public void HbmCustomizer_ShouldChangePropertyAttribute()
        {
            ClassInfo clazz    = TestUtils.ParseHbm("Agency.hbm.xml", "Agency", ClassType.JoinedSubClass);
            Property  nameProp = clazz.GetAndAssertProperty("Name");

            var customizer = new HbmCustomizer();

            customizer.Register(LimitLengthOfName);
            customizer.Customize(clazz);

            nameProp.Should()
            .HaveName("OwnName")
            .HaveAttribute("length", "30")
            .HaveAttribute("column", "Name");
        }