| org.kuali.kfs.context.KualiTestBase org.kuali.module.gl.OriginEntryTestBase
All known Subclasses: org.kuali.module.gl.batch.BalanceForwardStepTest, org.kuali.module.gl.service.PosterServiceTest, org.kuali.module.gl.batch.FileEnterpriseFeederTest, org.kuali.module.gl.service.ScrubberServiceTest, org.kuali.module.gl.service.ScrubberFlexibleOffsetTest, org.kuali.module.gl.batch.ForwardEncumbranceTest, org.kuali.module.gl.service.impl.orgreversion.OrganizationReversionLogicTest,
OriginEntryTestBase | public class OriginEntryTestBase extends KualiTestBase (Code) | | OriginEntryTestBase...the uberpowerful base of a lot of GL tests. Basically, this class provides
many convenience methods for writing tests that test against large batches of origin entries.
|
Inner Class :protected class EntryHolder | |
Method Summary | |
protected void | assertOriginEntries(int groupCount, EntryHolder[] requiredEntries) Check all the entries in gl_origin_entry_t against the data passed in EntryHolder[]. | protected void | clearEncumbranceTable() Deletes everything in the gl encumbrance table. | protected void | clearExpenditureTable() | protected void | clearGlAccountBalanceTable() | protected void | clearGlBalanceTable() | protected void | clearGlEntryTable(String fin_coa_cd, String account_nbr) | protected void | clearOriginEntryTables() | protected void | clearReversalTable() | protected void | clearSufficientFundBalanceTable() | protected int | getGroup(List groups, String groupCode) | protected void | loadInputTransactions(String groupCode, String[] transactions, Date date) | protected void | loadInputTransactions(String groupCode, String[] transactions) | protected void | loadTransactions(String[] transactions, OriginEntryGroup group) | protected void | resetAllEnhancementFlags() | protected void | setApplicationConfigurationFlag(Class componentClass, String name, boolean value) | protected void | setUp() Sets up this test base; that means getting some services from Spring and reseting the
enhancement flags. | protected void | trace(Object o, int tabIndentCount) | protected void | traceList(List list, String name) |
FLEXIBLE_CLAIM_ON_CASH_BANK_ENABLED_FLAG | protected static Object[] FLEXIBLE_CLAIM_ON_CASH_BANK_ENABLED_FLAG(Code) | | |
FLEXIBLE_OFFSET_ENABLED_FLAG | protected static Object[] FLEXIBLE_OFFSET_ENABLED_FLAG(Code) | | |
OriginEntryTestBase | public OriginEntryTestBase()(Code) | | Constructs a OriginEntryTestBase instance
|
assertOriginEntries | protected void assertOriginEntries(int groupCount, EntryHolder[] requiredEntries)(Code) | | Check all the entries in gl_origin_entry_t against the data passed in EntryHolder[]. If any of them are different, assert an
error.
Parameters: groupCount - the expected size of the group Parameters: requiredEntries - an array of expected String-formatted entries to check against |
clearEncumbranceTable | protected void clearEncumbranceTable()(Code) | | Deletes everything in the gl encumbrance table.
|
clearExpenditureTable | protected void clearExpenditureTable()(Code) | | Deletes everything in the expenditure transaction table
|
clearGlAccountBalanceTable | protected void clearGlAccountBalanceTable()(Code) | | Deletes everything in the gl account balance table
|
clearGlBalanceTable | protected void clearGlBalanceTable()(Code) | | Deletes everything in the gl balance table
|
clearGlEntryTable | protected void clearGlEntryTable(String fin_coa_cd, String account_nbr)(Code) | | Deletes all entries in the entry table with the given chart code and account number
Parameters: fin_coa_cd - the chart code of entries to delete Parameters: account_nbr - the account number of entries to delete |
clearOriginEntryTables | protected void clearOriginEntryTables()(Code) | | Deletes everything in the gl origin entry table and the gl origin entry group table
|
clearReversalTable | protected void clearReversalTable()(Code) | | Deletes everything in the gl reversal table
|
clearSufficientFundBalanceTable | protected void clearSufficientFundBalanceTable()(Code) | | Deletes everything in the sufficient fund balance table
|
getGroup | protected int getGroup(List groups, String groupCode)(Code) | | Given a list of origin entry groups and a group source code, returns the id of the group with that source code
Parameters: groups - a List of groups to selectg a group from Parameters: groupCode - the source code of the group to select the id of the first group in the list with that source code, or -1 if no groups with that source code were found |
loadInputTransactions | protected void loadInputTransactions(String groupCode, String[] transactions, Date date)(Code) | | Given a group source code and a bunch of transactions, creates a new group and adds all
the transactions to that group
Parameters: groupCode - the source code of the new group Parameters: transactions - an array of String-formatted entries to save into the group Parameters: date - the creation date of the new group |
loadInputTransactions | protected void loadInputTransactions(String groupCode, String[] transactions)(Code) | | Given a group source code and a bunch of transactions, creates a new group and adds all
the transactions to that group; sets the group creation date to today
Parameters: groupCode - the source code of the new group Parameters: transactions - an array of String-formatted entries to save into the group |
loadTransactions | protected void loadTransactions(String[] transactions, OriginEntryGroup group)(Code) | | Loads an array of String formatted entries into the given origin entry group
Parameters: transactions - an array of String formatted entries Parameters: group - the group to save those entries into |
resetAllEnhancementFlags | protected void resetAllEnhancementFlags() throws Exception(Code) | | Resets the flexible offset and flexible claim on cash parameters, so that processes running as unit tests have consistent behaviors
throws: Exception - if the parameters could not be reset for some reason |
setApplicationConfigurationFlag | protected void setApplicationConfigurationFlag(Class componentClass, String name, boolean value) throws Exception(Code) | | Resets a parameter for the sake of the unit test
Parameters: componentClass - the module class of the parameter Parameters: name - the name of the parameter to reset Parameters: value - the new value for the parameter throws: Exception - thrown if some vague thing goes wrong |
setUp | protected void setUp() throws Exception(Code) | | Sets up this test base; that means getting some services from Spring and reseting the
enhancement flags.
See Also: junit.framework.TestCase.setUp |
trace | protected void trace(Object o, int tabIndentCount)(Code) | | Writes an object to standard out
Parameters: o - the object to output, after.. Parameters: tabIndentCount - the number of tabs to push the object output |
traceList | protected void traceList(List list, String name)(Code) | | Outputs the entire contents of a List to System.out
Parameters: list - a List, presumably of Origin entries, but really, it could be anything Parameters: name - the name of the list to display in the output |
|
|