.getColumnName(c));
}
// TODO getCatalog is not supported
-// assertEquals("Incorrect primary key table catalog", conn.getCatalog(),
-// rs.getString("PKTABLE_CAT"));
+ assertEquals("Incorrect primary key table catalog", conn.getCatalog(),
+ rs.getString("PKTABLE_CAT"));
assertEquals("Incorrect primary key table schema", "", rs
.getString("PKTABLE_SCHEM"));
assertEquals("Incorrect primary key table name",
assertEquals("Incorrect primary key column name", "fkey", rs
.getString("PKCOLUMN_NAME"));
// TODO getCatalog is not supported
-// assertEquals("Incorrect foreign key table catalog", conn.getCatalog(),
-// rs.getString("FKTABLE_CAT"));
+ assertEquals("Incorrect foreign key table catalog", conn.getCatalog(),
+ rs.getString("FKTABLE_CAT"));
assertEquals("Incorrect foreign key table schema", "", rs
.getString("FKTABLE_SCHEM"));
assertEquals("Incorrect foreign key table name",
public void test_getDatabaseMajorVersion() throws SQLException {
assertTrue("Incorrdct database major version", meta
.getDatabaseMajorVersion() >= 0);
- /*
- // Exception checking
+
+ // Exception checking
conn.close();
try {
} catch (SQLException e) {
// ok
}
- */
+
}
/**
assertTrue("Incorrect database minor version", meta
.getDatabaseMinorVersion() >= 0);
- /*
// Exception checking
conn.close();
} catch (SQLException e) {
// ok
}
- */
}
/**
assertTrue("Incorrect database product name", !"".equals(meta
.getDatabaseProductName().trim()));
- /*
// Exception checking
conn.close();
} catch (SQLException e) {
// ok
}
- */
+
}
/**
public void test_getDatabaseProductVersion() throws SQLException {
assertTrue("Incorrect database product version", !"".equals(meta
.getDatabaseProductVersion().trim()));
- /*
// Exception checking
conn.close();
} catch (SQLException e) {
// ok
}
- */
}
/**
fail("Incorrect value of default transaction isolation level");
}
- /*
// Exception checking
conn.close();
} catch (SQLException e) {
// ok
}
- */
}
/**
assertTrue("Incorrect driver name", driverName.trim().startsWith(
"SQLite"));
- /*
// Exception checking
conn.close();
} catch (SQLException e) {
// ok
}
- */
}
/**
public void test_getDriverVersion() throws SQLException {
assertTrue("Incorrect driver version", !"".equals(meta
.getDriverVersion().trim()));
- /*
+
//Exception checking
conn.close();
//ok
}
- */
}
.getColumnName(c));
}
// TODO getCatalog is not supported
-// assertEquals("Incorrect primary key table catalog", conn.getCatalog(),
-// rs.getString("PKTABLE_CAT"));
+ assertEquals("Incorrect primary key table catalog", conn.getCatalog(),
+ rs.getString("PKTABLE_CAT"));
assertEquals("Incorrect primary key table schema", "", rs
.getString("PKTABLE_SCHEM"));
assertEquals("Incorrect primary key table name",
DatabaseCreator.TEST_TABLE3, rs.getString("PKTABLE_NAME"));
assertEquals("Incorrect primary key column name", "fkey", rs
.getString("PKCOLUMN_NAME"));
-// assertEquals("Incorrect foreign key table catalog", conn.getCatalog(),
-// rs.getString("FKTABLE_CAT"));
+ assertEquals("Incorrect foreign key table catalog", conn.getCatalog(),
+ rs.getString("FKTABLE_CAT"));
assertEquals("Incorrect foreign key table schema", "", rs
.getString("FKTABLE_SCHEM"));
assertEquals("Incorrect foreign key table name",
public void test_getJDBCMinorVersion() throws SQLException {
assertTrue("Incorrect JDBC minor version",
meta.getJDBCMinorVersion() >= 0);
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
public void test_getJDBCMajorVersion() throws SQLException {
assertTrue("Incorrect JDBC major version",
meta.getJDBCMajorVersion() >= 0);
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
public void test_getNumericFunctions() throws SQLException {
escapedFunctions(NUMERIC_FUNCTIONS, meta.getNumericFunctions());
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
*/
@TestTargetNew(
level = TestLevel.SUFFICIENT,
- notes = "Functionality test fails: keys and catalogs are not supported. SQLException checking test fails",
+ notes = "Functionality test fails: keys and catalogs are not supported.",
method = "getPrimaryKeys",
args = {java.lang.String.class, java.lang.String.class, java.lang.String.class}
)
assertEquals("Incorrect column name", columnNames[c - 1], rsmd
.getColumnName(c));
}
-// assertEquals("Incorrect table catalogue", conn.getCatalog(), rs
-// .getString("TABLE_CAT").toLowerCase());
+ assertEquals("Incorrect table catalogue", conn.getCatalog(), rs
+ .getString("TABLE_CAT").toLowerCase());
assertEquals("Incorrect table schema", "", rs
.getString("TABLE_SCHEM"));
assertEquals("Incorrect table name", DatabaseCreator.TEST_TABLE1, rs
assertEquals("Incorrect column name", "id", rs.getString("COLUMN_NAME")
.toLowerCase());
assertEquals("Incorrect sequence number", 1, rs.getShort("KEY_SEQ"));
- // assertEquals("Incorrect primary key name", "primary", rs.getString(
- // "PK_NAME").toLowerCase());
+ assertEquals("Incorrect primary key name", "primary", rs.getString(
+ "PK_NAME").toLowerCase());
rs.close();
//Exception checking
}
assertFalse("Incorrect result set holdability", meta
.supportsResultSetHoldability(hdb));
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
public void test_getSQLKeywords() throws SQLException {
assertTrue("Incorrect SQL keywords", !"".equals(meta.getSQLKeywords()
.trim()));
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
fail("Incorrect SQL state types");
}
- /*
- //Exception checking
+
+ //Exception checking
conn.close();
try {
} catch (SQLException e) {
//ok
}
- */
+
}
/**
}
rs.close();
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
public void test_getSearchStringEscape() throws SQLException {
assertTrue("Incorrect search string escape", !"".equals(meta
.getSearchStringEscape().trim()));
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
public void test_getStringFunctions() throws SQLException {
escapedFunctions(STRING_FUNCTIONS, meta.getStringFunctions());
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
public void test_getSystemFunctions() throws SQLException {
escapedFunctions(SYSTEM_FUNCTIONS, meta.getSystemFunctions());
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
}
rs.close();
- /*
+
//Exception checking
conn.close();
//ok
}
- */
}
/**
method = "getTables",
args = {java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String[].class}
)
- @KnownFailure("If no schema is associated: returns empty string or shouldn't null be returned?. Ticket 98")
+ @KnownFailure("If no schema is associated: returns empty string where actually null be returned?. Ticket 98")
public void test_getTablesLjava_lang_StringLjava_lang_StringLjava_lang_String$Ljava_lang_String()
throws SQLException {
String[] tablesName = {
assertTrue("Wrong table name", Arrays.binarySearch(tablesName, rs
.getString("TABLE_NAME")) > -1);
//No Schema associated
-// assertNull("Wrong table schema: "+rs.getString("TABLE_SCHEM"), rs.getString("TABLE_SCHEM"));
+ assertNull("Wrong table schema: "+rs.getString("TABLE_SCHEM"), rs.getString("TABLE_SCHEM"));
assertTrue("Wrong table type", Arrays.binarySearch(tablesType, rs
.getString("TABLE_TYPE")) > -1);
assertEquals("Wrong parameter REMARKS", "", rs.getString("REMARKS"));
assertTrue("No tables exist", rs.next());
assertEquals("Wrong table name", VIEW_NAME, rs.getString("TABLE_NAME"));
-// assertNull("Wrong table schema: "+rs.getString("TABLE_SCHEM"), rs.getString("TABLE_SCHEM"));
+ assertNull("Wrong table schema: "+rs.getString("TABLE_SCHEM"), rs.getString("TABLE_SCHEM"));
assertEquals("Wrong table type", "VIEW", rs.getString("TABLE_TYPE"));
assertEquals("Wrong parameter REMARKS", "", rs.getString("REMARKS"));
assertFalse("Wrong size of result set", rs.next());
while (rs.next()) {
assertTrue("Wrong table name", Arrays.binarySearch(tablesName, rs
.getString("TABLE_NAME")) > -1);
-// assertNull("Wrong table schema ", rs.getString("TABLE_SCHEM"));
+ assertNull("Wrong table schema ", rs.getString("TABLE_SCHEM"));
assertTrue("Wrong table type", Arrays.binarySearch(tablesType, rs
.getString("TABLE_TYPE")) > -1);
assertEquals("Wrong parameter REMARKS", "", rs.getString("REMARKS"));
}
rs.close();
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
escapedFunctions(TIMEDATE_FUNCTIONS, meta.getTimeDateFunctions());
- /*
- //Exception checking
+
+ //Exception checking
conn.close();
try {
} catch (SQLException e) {
//ok
}
- */
}
/**
method = "getTypeInfo",
args = {}
)
+ @KnownFailure("not supported")
public void test_getTypeInfo() throws SQLException {
insertNewRecord();
.getInt("DATA_TYPE")) > -1);
}
rs.close();
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
@KnownFailure("Ticket 98")
public void test_getURL() throws SQLException {
assertEquals("Wrong url", Support_SQL.sqlUrl, meta.getURL());
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
args = {}
)
@KnownFailure("Ticket 98")
- public void test_getUserName() throws SQLException {
+ public void s() throws SQLException {
assertEquals("Wrong user name", Support_SQL.sqlUser, meta.getUserName());
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
"visible row insert can be detected for TYPE_SCROLL_SENSITIVE type",
meta.insertsAreDetected(ResultSet.TYPE_SCROLL_SENSITIVE));
- /*
- //Exception checking
+
+ //Exception checking
conn.close();
try {
} catch (SQLException e) {
//ok
}
- */
+
}
/**
public void test_isReadOnly() throws SQLException {
assertFalse("database is not read-only", meta.isReadOnly());
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
}
/**
"deletes made by others are visible for TYPE_SCROLL_SENSITIVE type",
meta.othersDeletesAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE));
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
"inserts made by others are visible for TYPE_SCROLL_SENSITIVE type",
meta.othersInsertsAreVisible(ResultSet.TYPE_SCROLL_SENSITIVE));
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
} catch (SQLException e) {
//ok
}
- */
+
}
@TestTargetNew(
method = "supportsColumnAliasing",
args = {}
)
+ @KnownFailure("not supported. SQLException checking test fails")
public void test_supportsColumnAliasing() throws SQLException {
insertNewRecord();
rs.close();
//Exception checking
- /*
conn.close();
try {
} catch (SQLException e) {
//ok
}
- */
+
}
method = "supportsExpressionsInOrderBy",
args = {}
)
+ @KnownFailure("exception test fails")
public void test_supportsExpressionsInOrderBy() throws SQLException {
insertNewRecord();
}
//Exception checking
- /*
conn.close();
try {
} catch (SQLException e) {
//ok
}
- */
+
}
method = "supportsGroupBy",
args = {}
)
+ @KnownFailure("exception test fails")
public void test_supportsGroupBy() throws SQLException {
insertNewRecord();
}
//Exception checking
- /*
conn.close();
try {
} catch (SQLException e) {
//ok
}
- */
+
}
method = "supportsGroupByUnrelated",
args = {}
)
+ @KnownFailure("exception test fails")
public void test_supportsGroupByUnrelated() throws SQLException {
insertNewRecord();
}
//Exception checking
- /*
conn.close();
try {
} catch (SQLException e) {
//ok
}
- */
+
}
/**
statementForward.execute("create table companies(id integer not null);");
statementForward.execute("drop table companies");
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
method = "supportsOrderByUnrelated",
args = {}
)
+ @KnownFailure("exception test fails")
public void test_supportsOrderByUnrelated() throws SQLException {
insertNewRecord();
}
//Exception checking
-
- /*
conn.close();
try {
} catch (SQLException e) {
//ok
}
- */
+
}
/**
method = "supportsSelectForUpdate",
args = {}
)
+ @KnownFailure("exception test fails")
public void test_supportsSelectForUpdate() throws SQLException {
insertNewRecord();
//Exception checking
- /*
conn.close();
try {
} catch (SQLException e) {
//ok
}
- */
+
}
/**
method = "supportsSubqueriesInExists",
args = {}
)
+ @KnownFailure("exception test fails")
public void test_supportsSubqueriesInExists() throws SQLException {
insertNewRecord();
}
}
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**
method = "supportsTableCorrelationNames",
args = {}
)
+ @KnownFailure("exception test fails")
public void test_supportsTableCorrelationNames() throws SQLException {
insertNewRecord();
}
}
- /*
+
//Exception checking
conn.close();
} catch (SQLException e) {
//ok
}
- */
+
}
/**