D
- DAO classT
- Entity type of the DAOK
- Key type of the DAOpublic abstract class AbstractDaoTestSinglePk<D extends AbstractDao<T,K>,T,K> extends AbstractDaoTest<D,T,K>
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<K> |
usedPks |
dao, daoAccess, daoClass, identityScopeForDao
Constructor and Description |
---|
AbstractDaoTestSinglePk(java.lang.Class<D> daoClass) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
createEntity(K key)
Creates an insertable entity.
|
protected T |
createEntityWithRandomPk() |
protected abstract K |
createRandomPk()
K does not have to be collision free, check nextPk for collision free PKs.
|
protected K |
nextPk()
Provides a collision free PK () not returned before in the current test.
|
protected android.database.Cursor |
queryWithDummyColumnsInFront(int dummyCount,
java.lang.String valueForColumn,
K pk) |
protected void |
runLoadPkTest(int offset) |
protected void |
setUp() |
void |
testCount() |
void |
testDelete() |
void |
testDeleteAll() |
void |
testDeleteByKeyInTx() |
void |
testDeleteInTx() |
void |
testInsertAndLoad() |
void |
testInsertInTx() |
void |
testInsertOrReplaceInTx() |
void |
testInsertOrReplaceTwice() |
void |
testInsertTwice() |
void |
testLoadAll() |
void |
testLoadPk() |
void |
testLoadPkWithOffset() |
void |
testQuery() |
void |
testReadWithOffset() |
void |
testRowId() |
void |
testUpdate() |
clearIdentityScopeIfAny, logTableDump, setIdentityScopeBeforeSetUp, setUpTableForDao
createApplication, createDatabase, getApplication, logTableDump, tearDown, terminateApplication
assertActivityRequiresPermission, assertReadingContentUriRequiresPermission, assertWritingContentUriRequiresPermission, getContext, scrubClass, setContext, testAndroidTestCaseSetupProperly
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
assertEquals, 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
protected java.util.Set<K> usedPks
public AbstractDaoTestSinglePk(java.lang.Class<D> daoClass)
protected void setUp() throws java.lang.Exception
setUp
in class AbstractDaoTest<D extends AbstractDao<T,K>,T,K>
java.lang.Exception
public void testInsertAndLoad()
public void testInsertInTx()
public void testCount()
public void testInsertTwice()
public void testInsertOrReplaceTwice()
public void testInsertOrReplaceInTx()
public void testDelete()
public void testDeleteAll()
public void testDeleteInTx()
public void testDeleteByKeyInTx()
public void testRowId()
public void testLoadAll()
public void testQuery()
public void testUpdate()
public void testReadWithOffset()
public void testLoadPkWithOffset()
public void testLoadPk()
protected void runLoadPkTest(int offset)
protected android.database.Cursor queryWithDummyColumnsInFront(int dummyCount, java.lang.String valueForColumn, K pk)
protected K nextPk()
protected T createEntityWithRandomPk()
protected abstract K createRandomPk()
Available under the Apache License, Version 2.0 - Copyright © 2011-2015 greenrobot.de. All Rights Reserved.