OpenNMS API 1.2.3

org.opennms.install
Class InstallerDBTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.opennms.install.InstallerDBTest
All Implemented Interfaces:
junit.framework.Test

public class InstallerDBTest
extends junit.framework.TestCase


Field Summary
private  Installer m_installer
           
private  java.lang.String m_testDatabase
           
private static java.lang.String s_constraint
           
private static java.lang.String s_runProperty
           
 
Fields inherited from class junit.framework.TestCase
 
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 testConstraintAfterConstrainedColumn()
           
 void testConstraintAtEndOfTable()
           
 void testConstraintOnBogusColumn()
           
 void testConstraintsFixedDelOneTable()
           
 void testConstraintsFixedDelTwoTables()
           
 void testConstraintsFixedNullOneTable()
           
 void testConstraintsFixedNullTwoTables()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s_constraint

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

s_runProperty

private static final java.lang.String s_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

testConstraintAfterConstrainedColumn

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

testConstraintAtEndOfTable

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

testConstraintOnBogusColumn

public void testConstraintOnBogusColumn()
                                 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.2.3

Generated by eevans on May 29 2005 2015.