refactor & bug fixed.

This commit is contained in:
wenshao
2017-05-29 04:49:02 +08:00
parent a29eb6e0d2
commit 450f6bdd4b
4 changed files with 115 additions and 96 deletions
@@ -9,6 +9,7 @@ import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.Types;
import com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl;
import org.junit.Assert;
import junit.framework.TestCase;
@@ -48,25 +49,6 @@ public class FilterChainImplTest extends TestCase {
Assert.assertNull(new FilterChainImpl(dataSource).unwrap(null, null));
}
public void test_unwrap_1() throws Exception {
Assert.assertNull(new FilterChainImpl(dataSource).wrap((Connection) null, null));
}
public void test_unwrap_2() throws Exception {
Assert.assertNull(new FilterChainImpl(dataSource).wrap((ConnectionProxy) dataSource.getConnection().getConnection(),
(Statement) null));
}
public void test_unwrap_3() throws Exception {
Assert.assertNull(new FilterChainImpl(dataSource).wrap((ConnectionProxy) dataSource.getConnection().getConnection(),
(PreparedStatement) null, ""));
}
public void test_unwrap_4() throws Exception {
Assert.assertNull(new FilterChainImpl(dataSource).wrap((ConnectionProxy) dataSource.getConnection().getConnection(),
(CallableStatement) null, ""));
}
public void test_unwrap_5() throws Exception {
Assert.assertNull(new FilterChainImpl(dataSource).wrap((ConnectionProxy) dataSource.getConnection().getConnection(),
(Clob) null));