public void TestOracleSimpleDate()
        {
            //arrange
            var dt = new DateTime(2001, 3, 30);
            const SqlType sqlType = SqlType.Oracle;
            const string dbType = "DATE";

            var converter = new DateConverter(sqlType);

            //act
            var result = converter.Convert(dt, dbType);

            //assert
            Assert.AreEqual("DATE '2001-03-30'", result);
        }
        public void TestOracleDate()
        {
            //arrange
            var dt = new DateTime(2001, 3, 30, 10, 45, 30, 839);
            const SqlType sqlType = SqlType.Oracle;
            const string dbType = "DATE";

            var converter = new DateConverter(sqlType);

            //act
            var result = converter.Convert(dt, dbType);

            //assert
            Assert.AreEqual("TO_DATE('2001-03-30 10:45:30', 'yyyy-mm-dd hh24:mi:ss')", result);
        }
        public void TestDb2Time()
        {
            //arrange
            var dt = new DateTime(2001, 3, 30, 10, 45, 30, 839);
            const SqlType sqlType = SqlType.Db2;
            const string dbType = "TIME";

            var converter = new DateConverter(sqlType);

            //act
            var result = converter.Convert(dt, dbType);

            //assert
            Assert.AreEqual("'10:45:30.83'", result);
        }
        public void TestSqlServerDate()
        {
            //arrange
            var dt = new DateTime(2001, 3, 30, 10, 45, 30, 839);
            const SqlType sqlType = SqlType.SqlServer;
            const string dbType = "DATE";

            var converter = new DateConverter(sqlType);

            //act
            var result = converter.Convert(dt, dbType);

            //assert
            Assert.AreEqual("'20010330'", result);
        }
        public void TestOracleTimestamp()
        {
            //arrange
            var dt = new DateTime(2001, 3, 30, 10, 45, 30, 839);
            const SqlType sqlType = SqlType.Oracle;
            const string dbType = "TIMESTAMP";

            var converter = new DateConverter(sqlType);

            //act
            var result = converter.Convert(dt, dbType);

            //assert
            Assert.AreEqual("TIMESTAMP '2001-03-30 10:45:30.83'", result);
        }
        public void TestOracleTimestamp6()
        {
            //arrange
            var dt = new DateTime(2001, 3, 30, 10, 45, 30, 839);
            const SqlType sqlType = SqlType.Oracle;
            const string dbType = "TIMESTAMP(6)";

            var converter = new DateConverter(sqlType);

            //act
            var result = converter.Convert(dt, dbType);

            //assert
            Assert.AreEqual("TO_TIMESTAMP('2001-03-30 10:45:30.83900', 'yyyy-mm-dd hh24:mi:ss.FF')", result);
        }