コード例 #1
0
 public void CanSetColumnName()
 {
     var hbmId = new HbmId();
     var mapper = new IdMapper(null, hbmId);
     mapper.Column("MyName");
     hbmId.Columns.Single().name.Should().Be("MyName");
 }
コード例 #2
0
 public void WhenHasMemberCanSetAccessor()
 {
     var member = typeof (Entity).GetProperty("Id",
                                              BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic
                                              | BindingFlags.FlattenHierarchy);
     var hbmId = new HbmId();
     var mapper = new IdMapper(member, hbmId);
     mapper.Access(Accessor.NoSetter);
     hbmId.access.Should().Be("nosetter.camelcase");
 }
コード例 #3
0
 public void CanSetLength()
 {
     var hbmId = new HbmId();
     var mapper = new IdMapper(null, hbmId);
     mapper.Length(10);
     hbmId.length.Should().Be("10");
 }