mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge pull request #1096 from wenshao/master
update dependency to new versions
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user