net.sf.farrago.test
Class FarragoDdlGeneratorTest

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.FarragoDdlGeneratorTest
All Implemented Interfaces:
Test

public class FarragoDdlGeneratorTest
extends FarragoTestCase

Unit test cases for FarragoDdlGenerator.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/test/FarragoDdlGeneratorTest.java#14 $
Author:
Jason Ouellette

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
FarragoDdlGeneratorTest(String testName)
           
 
Method Summary
 void _testCustomSchema()
           
private  void appendStatementText(StringBuilder sb, GeneratedDdlStmt stmt)
          Appends all the statements in a GeneratedDdlStmt object to the end of a string.
private  String exportSchema(String schemaName, boolean includeNonSchemaElements)
           
protected  DiffRepository getDiffRepos()
           
protected  DdlGenerator newDdlGenerator()
           
protected  void setUp()
           
static Test suite()
           
 void testCascade()
           
 void testDdlGeneration()
          Test DDL generation for objects that don't have all the optional clauses.
 void testExportSales()
           
 
Methods inherited from class net.sf.farrago.test.FarragoTestCase
forceShutdown, getJdbcUri, getSession, getTestlogRoot, getTestlogRootStatic, newConnection, newJdbcEngineDriver, restoreParameters, restoreParameters, runCleanup, runSqlLineTest, runSqlLineTest, saveParameters, saveParameters, setRefFileDiffMasks, 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

FarragoDdlGeneratorTest

public FarragoDdlGeneratorTest(String testName)
                        throws Exception
Throws:
Exception
Method Detail

newDdlGenerator

protected DdlGenerator newDdlGenerator()

getDiffRepos

protected DiffRepository getDiffRepos()

suite

public static Test suite()

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class FarragoTestCase
Throws:
Exception

testExportSales

public void testExportSales()

exportSchema

private String exportSchema(String schemaName,
                            boolean includeNonSchemaElements)

testDdlGeneration

public void testDdlGeneration()
Test DDL generation for objects that don't have all the optional clauses.


testCascade

public void testCascade()
                 throws Exception
Throws:
Exception

appendStatementText

private void appendStatementText(StringBuilder sb,
                                 GeneratedDdlStmt stmt)
Appends all the statements in a GeneratedDdlStmt object to the end of a string.

Parameters:
sb - StringBuilder object to hold the text
stmt - GeneratedDdlStmt object we want the text for

_testCustomSchema

public void _testCustomSchema()
                       throws Exception
Throws:
Exception