示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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 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);
        }