public void TestString()
        {
            //arrange
            const string s = "Hello";
            const SqlType sqlType = SqlType.Db2;
            var dateTypes = new Dictionary<string, string>();

            var converter = new Converter(sqlType, dateTypes);

            //act
            var result = converter.Convert(typeof(string), s, "Name");

            //assert
            Assert.AreEqual("'Hello'", result);
        }
        public void TestDbNull()
        {
            //arrange
            var dbNull = DBNull.Value;
            const SqlType sqlType = SqlType.Db2;
            var dateTypes = new Dictionary<string, string>();

            var converter = new Converter(sqlType, dateTypes);

            //act
            var result = converter.Convert(typeof(string), dbNull, "Name");

            //assert
            Assert.AreEqual("NULL", result);
        }
        public void TestDate()
        {
            //arrange
            var dt = new DateTime(2001, 3, 30, 10, 45, 30, 839);
            const SqlType sqlType = SqlType.Db2;
            var dateTypes = new Dictionary<string, string>();
            dateTypes.Add("StartDate", "TIMESTAMP");

            var converter = new Converter(sqlType, dateTypes);

            //act
            var result = converter.Convert(typeof(DateTime), dt, "StartDate");

            //assert
            Assert.AreEqual("'2001-03-30 10:45:30.839'", result);
        }
        public void TestStringTimeSpan()
        {
            //arrange
            var ts = new TimeSpan(1, 2, 3);
            const SqlType sqlType = SqlType.SqlServer;
            var dateTypes = new Dictionary<string, string>();

            var converter = new Converter(sqlType, dateTypes);

            //act
            var result = converter.Convert(typeof(TimeSpan), ts, "Name");

            //assert
            Assert.AreEqual("'01:02:03'", result);
        }
        public void TestStringDecimal()
        {
            //arrange
            const decimal i = 10.5M;
            const SqlType sqlType = SqlType.SqlServer;
            var dateTypes = new Dictionary<string, string>();

            var converter = new Converter(sqlType, dateTypes);

            //act
            var result = converter.Convert(typeof(decimal), i, "Name");

            //assert
            Assert.AreEqual("10.5", result);
        }
        public void TestStringInteger()
        {
            //arrange
            const int i = 10;
            const SqlType sqlType = SqlType.SqlServer;
            var dateTypes = new Dictionary<string, string>();

            var converter = new Converter(sqlType, dateTypes);

            //act
            var result = converter.Convert(typeof(int), i, "Name");

            //assert
            Assert.AreEqual("10", result);
        }