Merge pull request #1096 from wenshao/master

update dependency to new versions
This commit is contained in:
wenshao
2016-03-06 05:52:36 +08:00
5 changed files with 63 additions and 34 deletions
@@ -55,7 +55,7 @@ public class WrapImplTest extends TestCase {
Assert.assertEquals(url, dataSource.getUrl());
Assert.assertEquals("jdbc:derby:classpath:petstore-db", dataSource.getRawUrl());
Assert.assertEquals(10, dataSource.getRawDriverMajorVersion());
Assert.assertEquals(9, dataSource.getRawDriverMinorVersion());
Assert.assertEquals(12, dataSource.getRawDriverMinorVersion());
Assert.assertFalse(connection.isWrapperFor(com.mysql.jdbc.Connection.class));
Assert.assertTrue(connection.isWrapperFor(ConnectionProxyImpl.class));
@@ -0,0 +1,23 @@
package com.alibaba.druid.bvt.sql.schemaStat;
import org.junit.Assert;
import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.parser.SQLStatementParser;
import com.alibaba.druid.sql.visitor.SchemaStatVisitor;
import junit.framework.TestCase;
public class SchemaStatTest extends TestCase {
public void test_schemaStat() throws Exception {
String sql = "select id as orderId from t_order order by orderId";
SQLStatementParser parser = new SQLStatementParser(sql);
SQLStatement stmt = parser.parseStatementList().get(0);
SchemaStatVisitor statVisitor = new SchemaStatVisitor();
stmt.accept(statVisitor);
Assert.assertEquals(1, statVisitor.getColumns().size());
}
}