示例#1
0
        public void FromDeclaredType_maps_types(string declaredType, int sqliteType, Type clrType, DbType dbType)
        {
            var map = SQLiteTypeMap.FromDeclaredType(declaredType, (SQLiteType)sqliteType);

            Assert.Equal(clrType, map.ClrType);
            Assert.Equal(dbType, map.DbType);
        }
示例#2
0
        public void FromDeclaredType_falls_back_using_sqlitetype()
        {
            var map = SQLiteTypeMap.FromDeclaredType("UNKNOWN", SQLiteType.Integer);

            Assert.Equal(typeof(long), map.ClrType);
        }
示例#3
0
        public void FromDeclaredType_ignores_sqlitetype()
        {
            var map = SQLiteTypeMap.FromDeclaredType("INTEGER", SQLiteType.Text);

            Assert.Equal(typeof(long), map.ClrType);
        }
示例#4
0
        public void FromDeclaredType_ignores_case()
        {
            var map = SQLiteTypeMap.FromDeclaredType("int", SQLiteType.Integer);

            Assert.Equal(typeof(int), map.ClrType);
        }
示例#5
0
        public void FromDeclaredType_ignores_facets()
        {
            var map = SQLiteTypeMap.FromDeclaredType("NVARCHAR(4000)", SQLiteType.Text);

            Assert.Equal(typeof(string), map.ClrType);
        }