|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
mondrian.test.DialectTest
public class DialectTest
Unit test which checks that Dialect
accurately represents the capabilities of the underlying database.
The existing mondrian tests, when run on various databases and drivers, make sure that Dialect never over-states the capabilities of a particular database. But sometimes they under-state a database's capabilities: for example, MySQL version 3 did not allow subqueries in the FROM clause, but version 4 does. This test helps ensure that mondrian is using the full capabilities of each database.
NOTE: If you see failures in this test, let the mondrian developers know! You may be running a version of a database which no one has tried before, and which has more capabilities than we expect. If you tell us about them, we can change mondrian to use those features.
Constructor Summary | |
---|---|
DialectTest(java.lang.String name)
Creates a DialectTest. |
Method Summary | |
---|---|
protected void |
assertQueryFails(java.lang.String sql,
java.lang.String[] patterns)
Asserts that a query fails. |
protected void |
assertQuerySucceeds(java.lang.String sql)
Asserts that a query succeeds and produces at least one row. |
protected java.sql.Connection |
getConnection()
|
protected javax.sql.DataSource |
getDataSource()
|
protected Dialect |
getDialect()
|
protected void |
tearDown()
|
void |
testAllowsCompoundCountDistinct()
|
void |
testAllowsCountDistinct()
|
void |
testAllowsDdl()
|
void |
testAllowsFromQuery()
|
void |
testAllowsGroupingSets()
Tests that the Dialect.supportsGroupingSets()
dialect property is accurate. |
void |
testAllowsMultipleCountDistinct()
|
void |
testAllowsOrderByAlias()
|
void |
testAllowsSelectNotInGroupBy()
Unit test for Dialect.allowsSelectNotInGroupBy() . |
void |
testDialectVsDatabaseProduct()
|
void |
testForceNullCollation()
Tests that the dialect can generate a valid query to sort ascending and descending, with NULL values appearing last in both cases. |
void |
testGenerateInline()
|
void |
testNullCollation()
Tests that the method Dialect.getNullCollation()
is accurate. |
void |
testRequiresFromQueryAlias()
|
void |
testRequiresOrderByAlias()
|
void |
testRequiresUnionOrderByExprToBeInSelectClause()
|
void |
testResultSetConcurrency()
|
void |
testSupportsGroupByExpressions()
|
void |
testSupportsMultiValueInExpr()
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DialectTest(java.lang.String name)
name
- Test case nameMethod Detail |
---|
protected javax.sql.DataSource getDataSource()
protected void tearDown() throws java.lang.Exception
tearDown
in class TestCase
java.lang.Exception
protected Dialect getDialect()
protected java.sql.Connection getConnection()
public void testDialectVsDatabaseProduct() throws java.sql.SQLException
java.sql.SQLException
public void testAllowsCompoundCountDistinct()
public void testAllowsCountDistinct()
public void testAllowsMultipleCountDistinct()
public void testAllowsDdl()
public void testAllowsFromQuery()
public void testRequiresFromQueryAlias()
public void testRequiresOrderByAlias()
public void testAllowsOrderByAlias()
public void testRequiresUnionOrderByExprToBeInSelectClause()
public void testSupportsGroupByExpressions()
public void testAllowsGroupingSets()
Dialect.supportsGroupingSets()
dialect property is accurate.
public void testSupportsMultiValueInExpr()
public void testResultSetConcurrency()
public void testGenerateInline() throws java.sql.SQLException
java.sql.SQLException
public void testNullCollation() throws java.sql.SQLException
Dialect.getNullCollation()
is accurate.
java.sql.SQLException
public void testForceNullCollation() throws java.sql.SQLException
java.sql.SQLException
protected void assertQuerySucceeds(java.lang.String sql)
sql
- SQL query in current dialectprotected void assertQueryFails(java.lang.String sql, java.lang.String[] patterns)
sql
- SQL querypatterns
- Array of expected patterns, generally one for each
SQL dialect for which the test is expected to failpublic void testAllowsSelectNotInGroupBy() throws java.sql.SQLException
Dialect.allowsSelectNotInGroupBy()
.
java.sql.SQLException
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |