org.kuali.rice.krad.datadictionary
Class BaseBOClassAndBaseDocumentClassTest

java.lang.Object
  extended by org.kuali.rice.test.BaseRiceTestCase
      extended by org.kuali.rice.test.RiceTestCase
          extended by org.kuali.rice.test.RiceInternalSuiteDataTestCase
              extended by org.kuali.rice.test.BaseModuleTestCase
                  extended by org.kuali.rice.test.BaselineTestCase
                      extended by org.kuali.test.KRADTestCase
                          extended by org.kuali.rice.krad.datadictionary.BaseBOClassAndBaseDocumentClassTest
All Implemented Interfaces:
MethodAware

public class BaseBOClassAndBaseDocumentClassTest
extends KRADTestCase

This is a test case for the data dictionary's ability to index entries by a "base" superclass.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.test.BaselineTestCase
BaselineTestCase.BaselineMode, BaselineTestCase.Mode
 
Field Summary
(package private)  DataDictionary dd
           
 
Fields inherited from class org.kuali.rice.test.BaselineTestCase
dirty
 
Fields inherited from class org.kuali.rice.test.BaseModuleTestCase
LOG, moduleName
 
Fields inherited from class org.kuali.rice.test.RiceTestCase
DEFAULT_TEST_HARNESS_SPRING_BEANS, failedSuiteTestName, perTestLifeCycles, SUITE_LIFE_CYCLES_FAILED, SUITE_LIFE_CYCLES_RAN, suiteLifeCycles
 
Fields inherited from class org.kuali.rice.test.BaseRiceTestCase
log, method
 
Constructor Summary
BaseBOClassAndBaseDocumentClassTest()
           
 
Method Summary
private  void assertBusinessObjectEntryIsAccountType2(BusinessObjectEntry boEntry)
          A convenience method for checking if a BusinessObjectEntry represents the AccountType2 DD entry.
private  void assertDocumentEntryIsRiceTestTransactionalDocument2(DocumentEntry docEntry)
          A convenience method for checking if a DocumentEntry represents the RiceTestTransactionalDocument2 DD entry.
private  void assertExpectedOutcomeOfBOEntryConstruction(Class<? extends BusinessObject> boClass, Class<? extends BusinessObject> boBaseClass, boolean shouldSucceed)
          A convenience method for testing the construction of a BusinessObjectEntry that has the given BO class and "base" class.
private  void assertExpectedOutcomeOfDocEntryConstruction(Class<? extends Document> docClass, Class<? extends Document> docBaseClass, boolean shouldSucceed)
          A convenience method for testing the construction of a DocumentEntry that has the given doc class and "base" class.
 void setUp()
          Performs setup tasks similar to those in ExtensionAttributeTest.
 void tearDown()
          Performs tearDown tasks similar to those in ExtensionAttributeTest.
 void testRetrieveDDEntriesByBaseClass()
          This method tests the DataDictionary's ability to grab entries based on a "base" class.
 void testValidAndInvalidDDEntries()
          This method tests to make sure that business object entries and document entries can only define regular and "base" classes that are compatible.
 
Methods inherited from class org.kuali.test.KRADTestCase
getLoadApplicationLifecycle, getSuiteLifecycles, loadSuiteTestData
 
Methods inherited from class org.kuali.rice.test.BaselineTestCase
getClearDbPerTestLifecycles, getMode, getPerTestLifecycles, getPerTestTablesNotToClear, getPerTestTablesToClear, getRollbackClearDbPerTestLifecycles, getRollbackTestLifecycles
 
Methods inherited from class org.kuali.rice.test.BaseModuleTestCase
getModuleName
 
Methods inherited from class org.kuali.rice.test.RiceInternalSuiteDataTestCase
getKIMDataLoadOrderFile, getKIMSqlFileBaseLocation, getKRADDefaultSuiteTestData
 
Methods inherited from class org.kuali.rice.test.RiceTestCase
configureLogging, dumpMemory, getBaseDir, getConfigLocations, getFullTestName, getModuleTestConfigLocation, getRiceMasterDefaultConfigFile, getTestHarnessConfig, getTestHarnessSpringBeansLocation, getTestHarnessSpringResourceLoader, getUserDir, loadPerTestData, logAfterRun, logBeforeRun, report, setBaseDirSystemProperty, setClearTables, setModuleName, setUpInternal, startLifecycles, startSuiteDataLoaderLifecycles, stopLifecycles
 
Methods inherited from class org.kuali.rice.test.BaseRiceTestCase
getName, getPerTestDataLoaderLifecycle, resetLogLevels, setLogLevel, setName, setTestMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dd

DataDictionary dd
Constructor Detail

BaseBOClassAndBaseDocumentClassTest

public BaseBOClassAndBaseDocumentClassTest()
Method Detail

setUp

public void setUp()
           throws Exception
Performs setup tasks similar to those in ExtensionAttributeTest.

Overrides:
setUp in class BaselineTestCase
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Performs tearDown tasks similar to those in ExtensionAttributeTest.

Overrides:
tearDown in class RiceTestCase
Throws:
Exception

testValidAndInvalidDDEntries

public void testValidAndInvalidDDEntries()
                                  throws Exception
This method tests to make sure that business object entries and document entries can only define regular and "base" classes that are compatible.

Throws:
Exception

testRetrieveDDEntriesByBaseClass

public void testRetrieveDDEntriesByBaseClass()
                                      throws Exception
This method tests the DataDictionary's ability to grab entries based on a "base" class.

Throws:
Exception

assertExpectedOutcomeOfBOEntryConstruction

private void assertExpectedOutcomeOfBOEntryConstruction(Class<? extends BusinessObject> boClass,
                                                        Class<? extends BusinessObject> boBaseClass,
                                                        boolean shouldSucceed)
                                                 throws Exception
A convenience method for testing the construction of a BusinessObjectEntry that has the given BO class and "base" class.

Parameters:
boClass - The businessObjectClass of the entry.
boBaseClass - The "base" class of the entry.
shouldSucceed - Indicates whether the construction task should succeed or fail.
Throws:
Exception

assertExpectedOutcomeOfDocEntryConstruction

private void assertExpectedOutcomeOfDocEntryConstruction(Class<? extends Document> docClass,
                                                         Class<? extends Document> docBaseClass,
                                                         boolean shouldSucceed)
                                                  throws Exception
A convenience method for testing the construction of a DocumentEntry that has the given doc class and "base" class.

Parameters:
docClass - The documentClass of the entry.
docBaseClass - The "base" class of the entry.
docClassFirst - Indicates if either the doc class or the "base" class should be set first.
shouldSucceed - Indicates whether the construction task should succeed or fail.
Throws:
Exception

assertBusinessObjectEntryIsAccountType2

private void assertBusinessObjectEntryIsAccountType2(BusinessObjectEntry boEntry)
                                              throws Exception
A convenience method for checking if a BusinessObjectEntry represents the AccountType2 DD entry.

Parameters:
boEntry - The BusinessObjectEntry to test.
Throws:
Exception

assertDocumentEntryIsRiceTestTransactionalDocument2

private void assertDocumentEntryIsRiceTestTransactionalDocument2(DocumentEntry docEntry)
                                                          throws Exception
A convenience method for checking if a DocumentEntry represents the RiceTestTransactionalDocument2 DD entry.

Parameters:
docEntry - The DocumentEntry to test.
Throws:
Exception


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.