public class JpaPersistenceProviderTest extends KRADTestCase
KRADTestCase.BootstrapTest, KRADTestCase.Legacy
BaselineTestCase.BaselineMode, BaselineTestCase.Mode
Modifier and Type | Field and Description |
---|---|
protected PersistenceProvider |
provider
The PersistenceProvider being tested
|
dd, kradTestHarnessSpringResourceLoader
dirty
LOG, moduleName
DEFAULT_TEST_HARNESS_SPRING_BEANS, failedSuiteTestName, perTestLifeCycles, SUITE_LIFE_CYCLES_FAILED, SUITE_LIFE_CYCLES_RAN, suiteLifeCycles
log, method
Constructor and Description |
---|
JpaPersistenceProviderTest() |
Modifier and Type | Method and Description |
---|---|
protected void |
addLinkedReferences(Object o) |
protected void |
addUnlinkedReferences(Object o) |
protected void |
assertTestObjectEquals(Object oExpected,
Object oActual) |
protected void |
assertTestObjectIdentityEquals(Object oExpected,
Object oActual) |
protected void |
assignPK(Object a)
Assigns the next generated primary key value to the test object
|
protected Map.Entry<Object,QueryByCriteria> |
createForQuery()
Creates a test object and generates a matching query for it
|
protected Map.Entry<List<Object>,QueryByCriteria.Builder> |
createForQuery(int count)
Generates a batch of test objects and returns a single query that will select them all.
|
protected Object |
createLinkedTestObject()
Creates an unsaved test object
|
protected Object |
createTopLevelObject() |
protected Object |
createUnlinkedTestObject()
Creates an unsaved, unlinked test object
|
protected Object |
getIdForLookup(Object o) |
protected String |
getNextTestObjectId() |
protected PersistenceProvider |
getPersistenceProvider() |
protected String[] |
getPropertiesForQuery() |
protected QueryByCriteria |
queryFor(Object a)
Derives a QueryByCriteria for a test object
|
protected void |
setTestObjectPK(Object o,
Object key) |
void |
setup()
Obtains PersistenceProvider.
|
void |
testDeleteAll()
Exercises the deleteAll method to ensure expected behavior
|
void |
testDeleteMatchingAllSavedEntities()
Tests the deletion of saved objects.
|
void |
testDeleteMatchingEmptyCriteria()
Test delete matching with empty criteria, should throw an exception
|
void |
testDeleteMatchingNonExistentEntity()
Tests the deletion of non-existent detached objects.
|
void |
testDeleteMatchingNullCriteria()
Test delete matching with null criteria, should throw an exception
|
void |
testDeleteNonExistentEntity()
Tests that deletion of a non-existent detached object does not result in a save of the object
via merge.
|
void |
testExistsSubQueryCriteria() |
void |
testExtensionKeySaving() |
void |
testFindAll()
Exercises the findAll method to ensure expected behavior
|
void |
testFindByCompoundKey() |
void |
testFindBySingleKey() |
void |
testFindMatching() |
void |
testFindMatchingEmptyCriteria()
Ensures no errors or exceptions occur when the second parameter's predicate value is null
|
void |
testFindMatchingNullCriteria()
Ensures an IllegalArgumentException is thrown when a null value is passed in as the second parameter.
|
void |
testFindMatchingOrderBy() |
void |
testFindWithResultsWindow() |
void |
testHandles() |
void |
testSaveLinkedSkipLinking() |
void |
testSaveUnlinkedSkipLinking() |
void |
testSimpleSave() |
getKRADTestHarnessContext, getLoadApplicationLifecycle, getPerTestTablesNotToClear, getSuiteLifecycles, getTestDictionaryObject, loadSuiteTestData, setUp, setUpInternal, setUpLegacyContext, tearDown, tearDownLegacyContext
getClearDbPerTestLifecycles, getMode, getPerTestLifecycles, getPerTestTablesToClear, getRollbackClearDbPerTestLifecycles, getRollbackTestLifecycles
getModuleName
getKIMDataLoadOrderFile, getKIMSqlFileBaseLocation, getKRADDefaultSuiteTestData
configureLogging, dumpMemory, getConfigLocations, getFullTestName, getModuleTestConfigLocation, getRiceMasterDefaultConfigFile, getTestHarnessConfig, getTestHarnessSpringBeansLocation, getTestHarnessSpringResourceLoader, getUserDir, loadPerTestData, logAfterRun, logBeforeRun, report, setBaseDirSystemProperty, setClearTables, setModuleName, startLifecycles, startSuiteDataLoaderLifecycles, stopLifecycles
getName, getPerTestDataLoaderLifecycle, getTestMethod, resetLogLevels, setLogLevel, setName, setTestMethod
protected PersistenceProvider provider
public JpaPersistenceProviderTest()
public void setup()
protected QueryByCriteria queryFor(Object a)
protected Object createLinkedTestObject()
protected Object createUnlinkedTestObject()
protected void assignPK(Object a)
protected Map.Entry<Object,QueryByCriteria> createForQuery()
protected Map.Entry<List<Object>,QueryByCriteria.Builder> createForQuery(int count)
public void testSimpleSave()
public void testSaveLinkedSkipLinking()
public void testExtensionKeySaving()
public void testExistsSubQueryCriteria()
public void testSaveUnlinkedSkipLinking()
public void testFindMatching()
public void testFindMatchingNullCriteria()
public void testFindMatchingEmptyCriteria()
public void testFindBySingleKey()
public void testFindByCompoundKey()
public void testFindMatchingOrderBy()
public void testFindWithResultsWindow()
public void testFindAll()
public void testDeleteNonExistentEntity()
public void testDeleteMatchingNullCriteria()
public void testDeleteMatchingEmptyCriteria()
public void testDeleteMatchingNonExistentEntity()
public void testDeleteMatchingAllSavedEntities()
public void testDeleteAll()
public void testHandles()
protected Object createTopLevelObject()
protected void addLinkedReferences(Object o)
protected void addUnlinkedReferences(Object o)
protected String[] getPropertiesForQuery()
protected Object getIdForLookup(Object o)
protected String getNextTestObjectId()
protected void setTestObjectPK(Object o, Object key)
protected void assertTestObjectIdentityEquals(Object oExpected, Object oActual)
protected void assertTestObjectEquals(Object oExpected, Object oActual)
protected PersistenceProvider getPersistenceProvider()
Copyright © 2005–2015 The Kuali Foundation. All rights reserved.