public void SortByName()
        {
            var entityMapper  = MappingFactory.CreateEntityMappingFromAnnonations <NotNullEntity>();
            var schemaTable   = DataSourceBuilder.BuildSchemaTableFromEntityMapping(entityMapper);
            var schemaMapping = new SchemaMapping();

            schemaMapping.Load(schemaTable);
            var columns = schemaMapping.Columns.ToArray();

            SchemaMappingColumn.SortByName(columns, "FID", "FIntProp", "FLongProp");

            Assert.AreEqual("FID", columns[0].ColumnName);
        }
        public void BuildSchemaTableFromMapping()
        {
            var entityMapping = MappingFactory.CreateEntityMappingFromAnnonations <NotNullEntity>();
            var schemaTable   = DataSourceBuilder.BuildSchemaTableFromEntityMapping(entityMapping);

            AssertSchemaTable(schemaTable, new[]
            {
                new SchemaMappingColumn("FID", typeof(int), false),
                new SchemaMappingColumn("FIntProp", typeof(int), false),
                new SchemaMappingColumn("FShortProp", typeof(short), false),
                new SchemaMappingColumn("FLongProp", typeof(long), false),
                new SchemaMappingColumn("FFloatProp", typeof(float), false),
                new SchemaMappingColumn("FDoubleProp", typeof(double), false),
                new SchemaMappingColumn("FDecimalProp", typeof(decimal), false),
                new SchemaMappingColumn("FBoolProp", typeof(bool), false),
                new SchemaMappingColumn("FStringProp", typeof(string), true),
                new SchemaMappingColumn("FDateTimeProp", typeof(DateTime), false),
                new SchemaMappingColumn("FBinaryProp", typeof(byte[]), true),
                new SchemaMappingColumn("FGuidProp", typeof(Guid), false),
                new SchemaMappingColumn("FEnumProp", typeof(int), false),
            });
        }