public class ICCheckUnitTest extends java.lang.Object implements ReportCollector, ScriptApp
Modifier and Type | Field and Description |
---|---|
protected static java.sql.Connection |
dc |
protected static DatabaseInformation |
di |
protected static ICUnitTestMonitor |
monitor |
protected static java.util.Properties |
properties |
protected java.util.List |
reportList |
protected static ServerType |
serverType |
protected static SQLSpecificTransform |
sqlTransform |
protected static ValidateLogger |
vl |
PauseLogging, Redirect, RedirectLine, ResumeLogging, ScriptApp, ScriptAppClose, ScriptAppComment, WarningLogOnly
Constructor and Description |
---|
ICCheckUnitTest() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertNoReports(java.lang.String asserting) |
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.
|
protected java.sql.Connection |
getTenantConnection() |
protected MTContext |
getTestTenant() |
protected void |
icTest(java.lang.Class checkClass,
java.lang.String[] createCondition) |
protected void |
icTest(java.sql.Connection con,
java.lang.Class checkClass,
java.lang.String[] createCondition) |
protected void |
icTestWithFix(java.lang.Class checkClass,
java.lang.String[] createCondition,
java.lang.String[] fixSql) |
protected void |
icTestWithFix(java.sql.Connection con,
java.lang.Class checkClass,
java.lang.String[] createCondition,
java.lang.String[] fixSql)
Test a IC class that doesn't have a repair.
|
protected void |
listReports() |
protected static void |
log(java.lang.String string)
Write something to the log.
|
protected void |
manualFix(java.lang.String[] sql)
When there's no repair, manually fix the database and clear the errors.
|
protected void |
problemsFound()
Asserts that there are IC errors reported.
|
void |
report(Report report)
Called when there is some issue to report.
|
protected void |
runAllRepairs() |
void |
setUp() |
static void |
setUpBeforeClass() |
static void |
tearDownAfterClass() |
protected static java.sql.Connection dc
protected static java.util.Properties properties
protected static DatabaseInformation di
protected static ICUnitTestMonitor monitor
protected java.util.List reportList
protected static ServerType serverType
protected static SQLSpecificTransform sqlTransform
protected static ValidateLogger vl
public static void setUpBeforeClass() throws java.lang.Exception
java.lang.Exception
public static void tearDownAfterClass() throws java.lang.Exception
java.lang.Exception
public void setUp() throws java.lang.Exception
java.lang.Exception
protected void runAllRepairs() throws java.lang.Exception
java.lang.Exception
protected MTContext getTestTenant() throws java.sql.SQLException
java.sql.SQLException
protected java.sql.Connection getTenantConnection() throws java.sql.SQLException
java.sql.SQLException
protected void listReports()
protected void assertNoReports(java.lang.String asserting)
protected void problemsFound()
public void report(Report report) throws java.lang.Exception
ReportCollector
report
in interface ReportCollector
java.lang.Exception
protected java.util.List findInReportLists(java.lang.String group, java.lang.String key, java.lang.String searchValue)
group
- key
- searchValue
- protected void manualFix(java.lang.String[] sql) throws java.lang.Exception
java.lang.Exception
protected final void icTestWithFix(java.lang.Class checkClass, java.lang.String[] createCondition, java.lang.String[] fixSql) throws java.lang.Exception
java.lang.Exception
protected void icTestWithFix(java.sql.Connection con, java.lang.Class checkClass, java.lang.String[] createCondition, java.lang.String[] fixSql) throws java.lang.Exception
con
- checkClass
- The class to checkcreateCondition
- SQL that will create the condition the check searches for.fixSql
- SQL that will fix the condition, since a repair doesn't exist.java.lang.Exception
protected final void icTest(java.lang.Class checkClass, java.lang.String[] createCondition) throws java.lang.Exception
java.lang.Exception
protected void icTest(java.sql.Connection con, java.lang.Class checkClass, java.lang.String[] createCondition) throws java.lang.Exception
java.lang.Exception
protected static void log(java.lang.String string)