OpenNMS API 1.1.5

org.opennms.install
Class InstallerDBTest

java.lang.Object
  extended byTestCase
      extended byorg.opennms.install.InstallerDBTest

public class InstallerDBTest
extends TestCase

See Also:
Serialized Form

Field Summary
private static java.lang.String m_constraint
           
private  Installer m_installer
           
private static java.lang.String m_runProperty
           
private  java.lang.String m_testDatabase
           
 
Constructor Summary
InstallerDBTest()
           
 
Method Summary
 void destroyDatabase()
           
 void doTestBogusConstraint(java.lang.String constraint, java.lang.String errorSubstring)
           
 void doTestBug931(boolean dropForeignTable, int badRows, boolean fixConstraint)
           
 void executeSQL(java.lang.String command)
           
 void executeSQL(java.lang.String[] commands)
           
 boolean isDBTestEnabled()
           
protected  void setUp()
           
 void setupBug931(boolean breakConstraint, boolean dropForeignTable)
           
 void tearDown()
           
 void testBogusConstraintColumn()
           
 void testBogusConstraintName()
           
 void testBogusConstraintTable()
           
 void testBug1006HasOldTables()
          Call Installer.checkOldTables, which *should* throw an exception because we have created a table matching "_old_".
 void testBug1006NoOldTables()
          Call Installer.checkOldTables, which should *not* throw an exception because we have not created a table matching "_old_".
 void testBug931ConstraintsBadOneTable()
           
 void testBug931ConstraintsBadTwoTables()
           
 void testBug931ConstraintsOkayOneTable()
           
 void testBug931ConstraintsOkayTwoTables()
           
 void testConstraintsFixedDelOneTable()
           
 void testConstraintsFixedDelTwoTables()
           
 void testConstraintsFixedNullOneTable()
           
 void testConstraintsFixedNullTwoTables()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_constraint

private static final java.lang.String m_constraint
See Also:
Constant Field Values

m_runProperty

private static final java.lang.String m_runProperty
See Also:
Constant Field Values

m_testDatabase

private java.lang.String m_testDatabase

m_installer

private Installer m_installer
Constructor Detail

InstallerDBTest

public InstallerDBTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

public void tearDown()
              throws java.lang.Exception
Throws:
java.lang.Exception

isDBTestEnabled

public boolean isDBTestEnabled()

destroyDatabase

public void destroyDatabase()
                     throws java.sql.SQLException
Throws:
java.sql.SQLException

testBug1006NoOldTables

public void testBug1006NoOldTables()
                            throws java.sql.SQLException
Call Installer.checkOldTables, which should *not* throw an exception because we have not created a table matching "_old_".

Throws:
java.sql.SQLException

testBug1006HasOldTables

public void testBug1006HasOldTables()
                             throws java.sql.SQLException
Call Installer.checkOldTables, which *should* throw an exception because we have created a table matching "_old_". We check the exception message to ensure that it is the exception we are expecting, and fail otherwise.

Throws:
java.sql.SQLException

executeSQL

public void executeSQL(java.lang.String[] commands)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

executeSQL

public void executeSQL(java.lang.String command)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

setupBug931

public void setupBug931(boolean breakConstraint,
                        boolean dropForeignTable)
                 throws java.sql.SQLException
Throws:
java.sql.SQLException

testBug931ConstraintsOkayTwoTables

public void testBug931ConstraintsOkayTwoTables()
                                        throws java.lang.Exception
Throws:
java.lang.Exception

testBug931ConstraintsOkayOneTable

public void testBug931ConstraintsOkayOneTable()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testBug931ConstraintsBadTwoTables

public void testBug931ConstraintsBadTwoTables()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testBug931ConstraintsBadOneTable

public void testBug931ConstraintsBadOneTable()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

testConstraintsFixedNullTwoTables

public void testConstraintsFixedNullTwoTables()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testConstraintsFixedNullOneTable

public void testConstraintsFixedNullOneTable()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

testConstraintsFixedDelTwoTables

public void testConstraintsFixedDelTwoTables()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

testConstraintsFixedDelOneTable

public void testConstraintsFixedDelOneTable()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

testBogusConstraintName

public void testBogusConstraintName()
                             throws java.lang.Exception
Throws:
java.lang.Exception

testBogusConstraintTable

public void testBogusConstraintTable()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testBogusConstraintColumn

public void testBogusConstraintColumn()
                               throws java.lang.Exception
Throws:
java.lang.Exception

doTestBogusConstraint

public void doTestBogusConstraint(java.lang.String constraint,
                                  java.lang.String errorSubstring)
                           throws java.lang.Exception
Throws:
java.lang.Exception

doTestBug931

public void doTestBug931(boolean dropForeignTable,
                         int badRows,
                         boolean fixConstraint)
                  throws java.lang.Exception
Throws:
java.lang.Exception

OpenNMS API 1.1.5

Generated by root on January 31 2005 0135.