org.eigenbase.test
Class ConnectStringParserTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.eigenbase.test.ConnectStringParserTest
All Implemented Interfaces:
Test

public class ConnectStringParserTest
extends TestCase

Unit test for JDBC connect string parser, ConnectStringParser. The ConnectStringParser is adapted from code in Mondrian, but most of the tests below were unfortunately "reinvented" prior to having the Mondrian unit tests in hand.

Since:
Apr 3, 2006
Version:
$Id: //open/dev/farrago/src/org/eigenbase/test/ConnectStringParserTest.java#6 $
Author:
Steve Herskovitz

Constructor Summary
ConnectStringParserTest()
           
 
Method Summary
(package private) static void assertExceptionMatches(Throwable e, String expectedPattern)
           
 void testComplexStrings()
          tests complex connect strings, adapted directly from Mondrian tests.
 void testConnectStringErrors()
          tests for specific errors thrown by the parser.
 void testOleDbExamples()
          Tests most of the examples from the OLE DB spec.
 void testSimpleStrings()
          tests simple connect string, adapted from Mondrian tests.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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

ConnectStringParserTest

public ConnectStringParserTest()
Method Detail

testSimpleStrings

public void testSimpleStrings()
                       throws Throwable
tests simple connect string, adapted from Mondrian tests.

Throws:
Throwable

testComplexStrings

public void testComplexStrings()
                        throws Throwable
tests complex connect strings, adapted directly from Mondrian tests.

Throws:
Throwable

testConnectStringErrors

public void testConnectStringErrors()
                             throws Throwable
tests for specific errors thrown by the parser.

Throws:
Throwable

testOleDbExamples

public void testOleDbExamples()
                       throws Throwable
Tests most of the examples from the OLE DB spec. Omitted are cases for Window handles, returning multiple values, and special handling of "Provider" keyword.

Throws:
Throwable

assertExceptionMatches

static void assertExceptionMatches(Throwable e,
                                   String expectedPattern)