public abstract class MaintenanceRuleTestBase extends KualiTestBase
KualiTestConstants.TestConstantsbatchScheduleInitialized, configurationFailure, generatedFiles, log4jConfigured, springContextInitialized, transactionStatus, userSession, userSessionUsername| Constructor and Description |
|---|
MaintenanceRuleTestBase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertErrorCount(int expectedErrorCount)
This method tests whether the expected number of errors exists in the errorMap.
|
protected void |
assertFieldErrorDoesNotExist(String fieldName,
String errorKey)
This method tests whether a given combination of fieldName and errorKey does NOT exist in the GlobalVariables.getMessageMap().
|
protected void |
assertFieldErrorExistence(String fieldName,
String errorKey,
boolean expectedResult)
This method tests whether the existence check on the error matches what is expected by what is passed into expectedResult.
|
protected void |
assertFieldErrorExists(String fieldName,
String errorKey)
This method tests whether a given combination of fieldName and errorKey exists in the GlobalVariables.getMessageMap().
|
protected void |
assertGlobalErrorExists(String errorKey)
This method tests whether a given errorKey exists on the document itself (ie, not tied to a specific field).
|
protected boolean |
doesFieldErrorExist(String fieldName,
String errorKey)
This method tests whether the field error exists and returns the result of this test.
|
protected org.kuali.rice.kns.document.MaintenanceDocument |
newMaintDoc(org.kuali.rice.krad.bo.PersistableBusinessObject newBo)
This method creates a minimal MaintenanceDocument instance, and populates it with the provided businessObject for the
newMaintainable, and null for the oldMaintainable.
|
protected org.kuali.rice.kns.document.MaintenanceDocument |
newMaintDoc(org.kuali.rice.krad.bo.PersistableBusinessObject oldBo,
org.kuali.rice.krad.bo.PersistableBusinessObject newBo)
This method creates a minimal MaintenanceDocument instance, and populates it with the provided businessObjects for the
newMaintainable and oldMaintainable.
|
protected org.kuali.rice.kns.rules.MaintenanceDocumentRule |
setupMaintDocRule(org.kuali.rice.kns.document.MaintenanceDocument maintDoc,
Class ruleClass)
This method creates a new instance of the specified ruleClass, and then injects the maintenanceDocument and associated
business objects.
|
protected org.kuali.rice.kns.rules.MaintenanceDocumentRule |
setupMaintDocRule(org.kuali.rice.krad.bo.PersistableBusinessObject newBo,
Class ruleClass)
This method creates a new instance of the specified ruleClass, injects the businessObject(s).
|
protected org.kuali.rice.kns.rules.MaintenanceDocumentRule |
setupMaintDocRule(org.kuali.rice.krad.bo.PersistableBusinessObject oldBo,
org.kuali.rice.krad.bo.PersistableBusinessObject newBo,
Class ruleClass)
This method first creates a new MaintenanceDocument with the BusinessObject(s) passed in.
|
protected void |
testDefaultExistenceCheck(org.kuali.rice.krad.bo.PersistableBusinessObject bo,
String fieldName,
boolean shouldFail) |
addGeneratedFile, changeCurrentUser, clearAllCaches, clearBoCache, dumpMessageMapErrors, getTransactionManager, runBare, stopSpringContextcountTestCases, createResult, getName, run, run, runTest, setName, setUp, tearDown, toStringassertEquals, 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, formatpublic MaintenanceRuleTestBase()
protected org.kuali.rice.kns.document.MaintenanceDocument newMaintDoc(org.kuali.rice.krad.bo.PersistableBusinessObject newBo)
newSubAccount - - populated subAccount for the newMaintainableprotected org.kuali.rice.kns.document.MaintenanceDocument newMaintDoc(org.kuali.rice.krad.bo.PersistableBusinessObject oldBo, org.kuali.rice.krad.bo.PersistableBusinessObject newBo)
oldSubAccount - - populated subAccount for the oldMaintainablenewSubAccount - - populated subAccount for the newMaintainableprotected org.kuali.rice.kns.rules.MaintenanceDocumentRule setupMaintDocRule(org.kuali.rice.krad.bo.PersistableBusinessObject newBo, Class ruleClass)
newBo - - the populated businessObject for the newMaintainbleruleClass - - the class of rule to instantiateprotected org.kuali.rice.kns.rules.MaintenanceDocumentRule setupMaintDocRule(org.kuali.rice.krad.bo.PersistableBusinessObject oldBo, org.kuali.rice.krad.bo.PersistableBusinessObject newBo, Class ruleClass)
oldBo - - the populated businessObject for the oldMaintainablenewBo - - the populated businessObject for the newMaintainableruleClass - - the class of rule to instantiateprotected org.kuali.rice.kns.rules.MaintenanceDocumentRule setupMaintDocRule(org.kuali.rice.kns.document.MaintenanceDocument maintDoc, Class ruleClass)
maintDoc - - the populated MaintenanceDocument instanceruleClass - - the class of rule to instantiateprotected void testDefaultExistenceCheck(org.kuali.rice.krad.bo.PersistableBusinessObject bo, String fieldName, boolean shouldFail)
protected void assertErrorCount(int expectedErrorCount)
expectedErrorCount - - the number of errors expectedprotected boolean doesFieldErrorExist(String fieldName, String errorKey)
fieldName - errorKey - protected void assertFieldErrorExistence(String fieldName, String errorKey, boolean expectedResult)
fieldName - errorKey - expectedResult - - True if the error is expected, False if it is not.protected void assertFieldErrorDoesNotExist(String fieldName, String errorKey)
fieldName - - fieldName as it would be provided when adding the errorerrorKey - - errorKey as it would be provided when adding the errorprotected void assertFieldErrorExists(String fieldName, String errorKey)
fieldName - - fieldName as it would be provided when adding the errorerrorKey - - errorKey as it would be provided when adding the errorprotected void assertGlobalErrorExists(String errorKey)
errorKey - - errorKey as it would be provided when adding the errorCopyright © 2004–2015 The Kuali Foundation. All rights reserved.