示例#1
0
        public void CanSetAccessor()
        {
            var member = typeof(MyClass).GetProperty("Relation");
            var hbm    = new HbmOneToOne();
            var mapper = new OneToOneMapper(member, hbm);

            mapper.Access(Accessor.ReadOnly);
            Assert.That(hbm.Access, Is.EqualTo("readonly"));
        }
        public void CanSetAccessor()
        {
            var member = typeof(MyClass).GetProperty("Relation");
            var hbm    = new HbmOneToOne();
            var mapper = new OneToOneMapper(member, hbm);

            mapper.Access(Accessor.ReadOnly);
            hbm.Access.Should().Be("readonly");
        }