예제 #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);
        }
예제 #4
0
        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);
        }