net.sf.farrago.test.jdbc
Class FarragoEngineDriverTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eigenbase.test.DiffTestCase
              extended by net.sf.farrago.test.ResultSetTestCase
                  extended by net.sf.farrago.test.FarragoTestCase
                      extended by net.sf.farrago.test.jdbc.FarragoEngineDriverTest
All Implemented Interfaces:
Test

public class FarragoEngineDriverTest
extends FarragoTestCase

Farrago Engine Driver tests (refactored from FarragoJdbcTest)

Since:
Jun 4, 2006
Version:
$Id: //open/dev/farrago/src/net/sf/farrago/test/jdbc/FarragoEngineDriverTest.java#16 $
Author:
angel

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.farrago.test.FarragoTestCase
FarragoTestCase.Cleanup, FarragoTestCase.CleanupFactory
 
Field Summary
 
Fields inherited from class net.sf.farrago.test.FarragoTestCase
allocOwner, connection, preparedStmt, repos, stmt, tracer
 
Fields inherited from class net.sf.farrago.test.ResultSetTestCase
resultSet
 
Fields inherited from class org.eigenbase.test.DiffTestCase
logFile, logOutputStream, refFile
 
Constructor Summary
FarragoEngineDriverTest(String testname)
           
 
Method Summary
private static void assertExceptionMatches(Throwable e, String match)
          asserts that exception message matches the specified pattern.
private static Properties newProperties()
          creates test connection properties.
 void testConnectionInit()
          Tests special connection initialization based on connection properties.
 void testConnectStrings()
          Tests engine driver URIs with connection params.
 void testExcnStack()
          For background on this test, please see http://n2.nabble.com/SqlParseException.getCause%28%29-td1616492.html
 void testLabelInFarragoConnection()
           
 void testSessionParams()
          Tests that session parameter values make it to sessions_view.
 void testURIs()
          Tests engine driver URIs.
private static String toStringProperties(Properties props)
          renders Properties values with quotes for easier reading.
 
Methods inherited from class net.sf.farrago.test.FarragoTestCase
forceShutdown, getJdbcUri, getSession, getTestlogRoot, getTestlogRootStatic, newConnection, newJdbcEngineDriver, restoreParameters, restoreParameters, runCleanup, runSqlLineTest, runSqlLineTest, saveParameters, saveParameters, setRefFileDiffMasks, setUp, shouldDiff, staticSetUp, staticTearDown, tearDown, tearDownImpl, wrappedSuite, wrappedSuite
 
Methods inherited from class net.sf.farrago.test.ResultSetTestCase
compareResultList, compareResultLists, compareResultSet, compareResultSetWithDelta, compareResultSetWithPattern, getResultSetCount
 
Methods inherited from class org.eigenbase.test.DiffTestCase
addDiffMask, addIgnorePattern, diffFile, diffLines, diffTestLog, fileContents, openTestLog, openTestLogOutputStream, setGC, setVerbose
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FarragoEngineDriverTest

public FarragoEngineDriverTest(String testname)
                        throws Exception
Throws:
Exception
Method Detail

testURIs

public void testURIs()
              throws Exception
Tests engine driver URIs.

Throws:
Exception

testConnectStrings

public void testConnectStrings()
                        throws Exception
Tests engine driver URIs with connection params.

Throws:
Exception

testSessionParams

public void testSessionParams()
                       throws Exception
Tests that session parameter values make it to sessions_view.

Throws:
Exception

testConnectionInit

public void testConnectionInit()
                        throws Exception
Tests special connection initialization based on connection properties.

Throws:
Exception
See Also:
FarragoJdbcEngineConnection.initConnection(Properties)

testLabelInFarragoConnection

public void testLabelInFarragoConnection()
                                  throws Exception
Throws:
Exception

testExcnStack

public void testExcnStack()
                   throws Exception
For background on this test, please see http://n2.nabble.com/SqlParseException.getCause%28%29-td1616492.html

Throws:
Exception

newProperties

private static Properties newProperties()
creates test connection properties.


toStringProperties

private static String toStringProperties(Properties props)
renders Properties values with quotes for easier reading.


assertExceptionMatches

private static void assertExceptionMatches(Throwable e,
                                           String match)
                                    throws Exception
asserts that exception message matches the specified pattern.

Throws:
Exception