public void CanSetLength() { var part = new ElementPart(typeof(MappedObject)); part.Column("test"); part.Length(50); ElementMapping elementMapping = ((IElementMappingProvider)part).GetElementMapping(); elementMapping.Columns.First().Length.ShouldEqual(50); }
public void CanDeclareColumnNotNullable() { var part = new ElementPart(typeof(MappedObject)); part.Column("nullabilityCheck"); part.Not.Nullable(); ElementMapping elementMapping = ((IElementMappingProvider)part).GetElementMapping(); var columnMappings = elementMapping.Columns.ToList(); columnMappings.First().Nullable.ShouldEqual(false); }
public void CanDeclareColumnNullable() { var part = new ElementPart(typeof(MappedObject)); part.Column("nullabilityCheck"); part.Nullable(); ElementMapping elementMapping = ((IElementMappingProvider)part).GetElementMapping(); var columnMappings = elementMapping.Columns.ToList(); columnMappings.First().Nullable.ShouldEqual(true); }