本文整理匯總了C#中NHibernate.Cfg.MappingSchema.HbmId.GetMaxLength方法的典型用法代碼示例。如果您正苦於以下問題:C# HbmId.GetMaxLength方法的具體用法?C# HbmId.GetMaxLength怎麽用?C# HbmId.GetMaxLength使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NHibernate.Cfg.MappingSchema.HbmId
的用法示例。
在下文中一共展示了HbmId.GetMaxLength方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Should_get_the_correct_value_from_column_given_null_length
public void Should_get_the_correct_value_from_column_given_null_length()
{
const int expected = 16;
HbmId id = new HbmId
{
column = new[]
{
new HbmColumn
{
length = expected.ToString()
}
}
};
int? result = id.GetMaxLength();
result.ShouldNotBeNull();
result.Value.ShouldBeEqualTo(expected);
}
示例2: Should_get_the_correct_value_from_length_if_not_null
public void Should_get_the_correct_value_from_length_if_not_null()
{
const int expected = 16;
HbmId id = new HbmId
{
length = expected.ToString()
};
int? result = id.GetMaxLength();
result.ShouldNotBeNull();
result.Value.ShouldBeEqualTo(expected);
}
示例3: Should_get_null_given_null_length_and_column_length
public void Should_get_null_given_null_length_and_column_length()
{
HbmId id = new HbmId
{
column = new[] {new HbmColumn()}
};
int? result = id.GetMaxLength();
result.ShouldBeNull();
}