net.sourceforge.sqlunit.test
Class SymbolParserTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sourceforge.sqlunit.test.SymbolParserTest
All Implemented Interfaces:
junit.framework.Test

public class SymbolParserTest
extends junit.framework.TestCase

Runs some tests of the Symbol Parser.

Version:
$Revision: 1.1 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
SymbolParserTest(java.lang.String name)
          Boilerplate constructor.
 
Method Summary
static void main(java.lang.String[] argv)
          Boilerplate main method.
static junit.framework.Test suite()
          Boilerplate suite() method.
 void testFullSubstitution()
          Testing full substitution.
 void testPartialSubstitution()
          Testing partial substitution.
 void testPartialSubstitutionException()
          Testing full substitution when some variables are not supplied.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SymbolParserTest

public SymbolParserTest(java.lang.String name)
Boilerplate constructor.

Parameters:
name - the name of this test class.
Method Detail

main

public static void main(java.lang.String[] argv)
Boilerplate main method.

Parameters:
argv - the arguments (none).

suite

public static junit.framework.Test suite()
Boilerplate suite() method.

Returns:
a Test object.

testFullSubstitution

public void testFullSubstitution()
                          throws java.lang.Exception
Testing full substitution. Values for all variables referenced in the source must be supplied.

Throws:
java.lang.Exception - if one is thrown.

testPartialSubstitution

public void testPartialSubstitution()
                             throws java.lang.Exception
Testing partial substitution. Not all values for variables referenced in source need to be provided. This can allow a partially parsed string to be parsed once again when there are more variables available in the symbol table.

Throws:
java.lang.Exception - if one is thrown.

testPartialSubstitutionException

public void testPartialSubstitutionException()
                                      throws java.lang.Exception
Testing full substitution when some variables are not supplied. This should throw a ParseException with the appropriate error message.

Throws:
java.lang.Exception - if one is thrown.