1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

pgjindent jdbc files. First time jdbc files were formatted.

This commit is contained in:
Bruce Momjian
2001-10-25 06:00:05 +00:00
parent b81844b173
commit d2e27b0674
85 changed files with 23804 additions and 22165 deletions

View File

@ -6,56 +6,65 @@ import java.sql.*;
import java.math.BigDecimal;
/**
* $Id: JBuilderTest.java,v 1.3 2001/09/23 04:11:14 momjian Exp $
* $Id: JBuilderTest.java,v 1.4 2001/10/25 05:59:59 momjian Exp $
*
* Some simple tests to check that the required components needed for JBuilder
* stay working
*
*/
public class JBuilderTest extends TestCase {
public class JBuilderTest extends TestCase
{
public JBuilderTest(String name) {
super(name);
}
public JBuilderTest(String name)
{
super(name);
}
// Set up the fixture for this testcase: the tables for this test.
protected void setUp() throws Exception {
Connection con = JDBC2Tests.openDB();
// Set up the fixture for this testcase: the tables for this test.
protected void setUp() throws Exception
{
Connection con = JDBC2Tests.openDB();
JDBC2Tests.createTable( con, "test_c",
"source text,cost money,imageid int4" );
JDBC2Tests.createTable( con, "test_c",
"source text,cost money,imageid int4" );
JDBC2Tests.closeDB(con);
}
JDBC2Tests.closeDB(con);
}
// Tear down the fixture for this test case.
protected void tearDown() throws Exception {
Connection con = JDBC2Tests.openDB();
JDBC2Tests.dropTable(con, "test_c");
JDBC2Tests.closeDB(con);
}
// Tear down the fixture for this test case.
protected void tearDown() throws Exception
{
Connection con = JDBC2Tests.openDB();
JDBC2Tests.dropTable(con, "test_c");
JDBC2Tests.closeDB(con);
}
/**
* This tests that Money types work. JDBCExplorer barfs if this fails.
*/
public void testMoney() {
try {
Connection con = JDBC2Tests.openDB();
/**
* This tests that Money types work. JDBCExplorer barfs if this fails.
*/
public void testMoney()
{
try
{
Connection con = JDBC2Tests.openDB();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select cost from test_c");
assertNotNull(rs);
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select cost from test_c");
assertNotNull(rs);
while(rs.next()){
double bd = rs.getDouble(1);
}
while (rs.next())
{
double bd = rs.getDouble(1);
}
rs.close();
st.close();
rs.close();
st.close();
JDBC2Tests.closeDB(con);
} catch(Exception ex) {
fail(ex.getMessage());
}
}
JDBC2Tests.closeDB(con);
}
catch (Exception ex)
{
fail(ex.getMessage());
}
}
}