示例#1
0
        public void TestMySqlDbTypeNameToClientTypeResolverForTinyInt()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("TINYINT");

            // Assert
            Assert.AreEqual(typeof(sbyte), result);
        }
示例#2
0
        public void TestMySqlDbTypeNameToClientTypeResolverForNone()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("NONE");

            // Assert
            Assert.AreEqual(typeof(object), result);
        }
示例#3
0
        public void TestMySqlDbTypeNameToClientTypeResolverForYear()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("YEAR");

            // Assert
            Assert.AreEqual(typeof(int), result);
        }
示例#4
0
        public void TestMySqlDbTypeNameToClientTypeResolverForSmallInt()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("SMALLINT");

            // Assert
            Assert.AreEqual(typeof(short), result);
        }
示例#5
0
        public void TestMySqlDbTypeNameToClientTypeResolverForReal()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("REAL");

            // Assert
            Assert.AreEqual(typeof(double), result);
        }
示例#6
0
        public void TestMySqlDbTypeNameToClientTypeResolverForFloat()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("FLOAT");

            // Assert
            Assert.AreEqual(typeof(float), result);
        }
示例#7
0
        public void TestMySqlDbTypeNameToClientTypeResolverForTime()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("TIME");

            // Assert
            Assert.AreEqual(typeof(TimeSpan), result);
        }
示例#8
0
        public void TestMySqlDbTypeNameToClientTypeResolverForMultiPolygon()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("MULTIPOLYGON");

            // Assert
            Assert.AreEqual(typeof(byte[]), result);
        }
示例#9
0
        public void TestMySqlDbTypeNameToClientTypeResolverForVarChar()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("VARCHAR");

            // Assert
            Assert.AreEqual(typeof(string), result);
        }
示例#10
0
        public void TestMySqlDbTypeNameToClientTypeResolverForDateTime2()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("DATETIME2");

            // Assert
            Assert.AreEqual(typeof(DateTime), result);
        }
示例#11
0
        public void TestMySqlDbTypeNameToClientTypeResolverForInteger()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("INTEGER");

            // Assert
            Assert.AreEqual(typeof(long), result);
        }
示例#12
0
        public void TestMySqlDbTypeNameToClientTypeResolverForMediumText()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("MEDIUMTEXT");

            // Assert
            Assert.AreEqual(typeof(string), result);
        }
示例#13
0
        public void TestMySqlDbTypeNameToClientTypeResolverForBoolean()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("BOOLEAN");

            // Assert
            Assert.AreEqual(typeof(bool), result);
        }
示例#14
0
        public void TestMySqlDbTypeNameToClientTypeResolverForBinary()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("BINARY");

            // Assert
            Assert.AreEqual(typeof(byte[]), result);
        }
示例#15
0
        public void TestMySqlDbTypeNameToClientTypeResolverForNumeric()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("NUMERIC");

            // Assert
            Assert.AreEqual(typeof(decimal), result);
        }
示例#16
0
        public void TestMySqlDbTypeNameToClientTypeResolverForMediumBlob()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("MEDIUMBLOB");

            // Assert
            Assert.AreEqual(typeof(byte[]), result);
        }
示例#17
0
        public void TestMySqlDbTypeNameToClientTypeResolverForMultiLineString()
        {
            // Setup
            var resolver = new MySqlConnectorDbTypeNameToClientTypeResolver();

            // Act
            var result = resolver.Resolve("MULTILINESTRING");

            // Assert
            Assert.AreEqual(typeof(byte[]), result);
        }