代码格式化

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@76 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-05-14 09:49:00 +00:00
parent aad6bad813
commit 3e3d52f080
68 changed files with 1697 additions and 2929 deletions
@@ -11,42 +11,43 @@ import junit.framework.TestCase;
import org.junit.Assert;
public class MockExecuteTest extends TestCase {
public void test_0 () throws Exception {
public void test_0() throws Exception {
Connection conn = DriverManager.getConnection("jdbc:mock:");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT 2");
Assert.assertTrue(rs.next());
Assert.assertEquals(2, rs.getInt(1));
rs.close();
stmt.close();
conn.close();
}
public void test_1 () throws Exception {
public void test_1() throws Exception {
Connection conn = DriverManager.getConnection("jdbc:mock:");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT NULL");
Assert.assertTrue(rs.next());
Assert.assertEquals(0, rs.getInt(1));
Assert.assertEquals(null, rs.getObject(1));
rs.close();
stmt.close();
conn.close();
}
public void test_2 () throws Exception {
public void test_2() throws Exception {
Connection conn = DriverManager.getConnection("jdbc:mock:");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT NOW()");
Assert.assertTrue(rs.next());
Assert.assertTrue(rs.getObject(1) instanceof Timestamp);
rs.close();
stmt.close();
conn.close();
}