com.ibm.tivoli.maximo.integrity.unittest

Class ICCheckUnitTest

  • java.lang.Object
    • com.ibm.tivoli.maximo.integrity.unittest.ICCheckUnitTest
    • Constructor Detail

      • ICCheckUnitTest

        public ICCheckUnitTest()
    • Method Detail

      • setUpBeforeClass

        public static void setUpBeforeClass()
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • tearDownAfterClass

        public static void tearDownAfterClass()
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setUp

        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • runAllRepairs

        protected void runAllRepairs()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getTestTenant

        protected MTContext getTestTenant()
                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getTenantConnection

        protected java.sql.Connection getTenantConnection()
                                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • listReports

        protected void listReports()
      • assertNoReports

        protected void assertNoReports(java.lang.String asserting)
      • problemsFound

        protected void problemsFound()
        Asserts that there are IC errors reported.
      • report

        public void report(Report report)
                    throws java.lang.Exception
        Description copied from interface: ReportCollector
        Called when there is some issue to report.
        Specified by:
        report in interface ReportCollector
        Throws:
        java.lang.Exception
      • findInReportLists

        protected java.util.List findInReportLists(java.lang.String group,
                                                   java.lang.String key,
                                                   java.lang.String searchValue)
        Returns any reports found with the group and key contain the search value in their lists.
        Parameters:
        group -
        key -
        searchValue -
        Returns:
        the list of reports. This list can be null.
      • manualFix

        protected void manualFix(java.lang.String[] sql)
                          throws java.lang.Exception
        When there's no repair, manually fix the database and clear the errors.
        Throws:
        java.lang.Exception
      • icTestWithFix

        protected final void icTestWithFix(java.lang.Class checkClass,
                                           java.lang.String[] createCondition,
                                           java.lang.String[] fixSql)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • icTestWithFix

        protected void icTestWithFix(java.sql.Connection con,
                                     java.lang.Class checkClass,
                                     java.lang.String[] createCondition,
                                     java.lang.String[] fixSql)
                              throws java.lang.Exception
        Test a IC class that doesn't have a repair.
        Parameters:
        con -
        checkClass - The class to check
        createCondition - SQL that will create the condition the check searches for.
        fixSql - SQL that will fix the condition, since a repair doesn't exist.
        Throws:
        java.lang.Exception
      • icTest

        protected final void icTest(java.lang.Class checkClass,
                                    java.lang.String[] createCondition)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • icTest

        protected void icTest(java.sql.Connection con,
                              java.lang.Class checkClass,
                              java.lang.String[] createCondition)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • log

        protected static void log(java.lang.String string)
        Write something to the log.