public abstract class DataModuleTest
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected DistributableEntityManager |
manager
Distributed entity manager
|
| Constructor and Description |
|---|
DataModuleTest() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addReceiverPeerUID(IEntity iEntity)
Add receiver peer uid
|
protected void |
compareFilmElement(FilmBase referenceObject,
FilmBase objectToCheck)
Compare a reference object with an object to check
|
protected abstract ActorBase |
createActor()
Create an empty actor
|
protected abstract ActorBase |
createActor(java.lang.Integer actorId,
java.lang.String actorName,
java.lang.Integer filmId)
Create an empty actor
|
protected abstract FilmBase |
createFilm()
Create an empty film object
|
protected abstract FilmBase |
createFilm(java.lang.Integer filmID,
java.lang.String filmName,
java.lang.Integer duration,
java.sql.Timestamp creationDate,
java.lang.Long longField,
java.lang.Float floatField)
Create an empty film object
|
protected java.util.Map<java.lang.String,FilmBase> |
createSampleData()
Create sample data
|
protected abstract java.lang.String |
getLikeExpression()
Get the string expression that match contains "2" in the film name
|
abstract void |
instantiateManager()
Instantiate a distributable entity manager
|
void |
setUp()
Clean data inside the data source
|
void |
testAdd()
Test the add() method of entities with different values
|
void |
testAddNullValue()
Test the add() method with a null value
We should throw an illegal argument exception
|
void |
testConditionBetween()
Test list() method with between condition
|
void |
testConditionEquals()
Test list() method with equal condition
|
void |
testConditionGreaterThan()
Test list() method with greater than condition
|
void |
testConditionGreaterThanOrEqual()
Test list() method with greater than or equal condition
|
void |
testConditionIn()
Test list() method with in condition
|
void |
testConditionIsNull()
Test list() method with is null condition
|
void |
testConditionLessThan()
Test list() method with less than condition
|
void |
testConditionLessThanOrEqual()
Test list() method with less than or equal condition
|
void |
testConditionLike()
Test list() method with like condition
|
void |
testConditionNotBetween()
Test list() method with not between condition
|
void |
testConditionNotEquals()
Test list() method with not equal condition
|
void |
testConditionNotIn()
Test list() method with not in condition
|
void |
testConditionNotNull()
Test list() method with is not null condition
|
void |
testDelete()
Test delete() method
|
void |
testDeleteNullValue()
Test delete() method with null value
|
void |
testIsOpen()
Test data source connections
|
void |
testListAll()
Test list() all method with no data
|
void |
testListAllWithNullValue()
Test list() method with null value
We expect to have an illegal argument exception
|
void |
testLoadArray()
Test loadArray() method
|
void |
testLoadArrayEmptyParameter()
Test loadArray() method with empty value in 2nd parameter
We expect to have an illegal argument exception
|
void |
testLoadArrayNullValue1stParameter()
Test loadArray() method with null value in 1st parameter
We expect to have an illegal argument exception
|
void |
testLoadArrayNullValue2ndParameter()
Test loadArray() method with null value in 2nd parameter
We expect to have an illegal argument exception
|
void |
testRead()
Test read() method
|
void |
testReadLastElementNullValue()
Test read() method with null value
We expect to have an illegal argument exception
|
protected void |
testReadLastFilmElement(FilmBase objectToCheck)
JUnit tests to check that the last film element corresponds
to the object in parameter
|
void |
testReadNullValue()
Test read() method with null value
We expect to have an illegal argument exception
|
void |
testTransactionDelete()
Test executeTransaction() method with delete transaction
Test commit and rollback conditions
|
void |
testTransactionsAdd()
Test executeTransaction() method with add transaction
Test commit and rollback conditions
|
void |
testTransactionUpdate()
Test executeTransaction() method with update transaction
Test commit and rollback conditions
|
void |
testUpdate()
Test update() method
|
void |
testUpdateNullValue()
Test update() method with null value
We expect to have an illegal argument exception
|
protected DistributableEntityManager manager
public abstract void instantiateManager()
throws java.lang.Exception
java.lang.Exception - throw an exceptionprotected abstract void addReceiverPeerUID(IEntity iEntity)
iEntity - Entityprotected abstract FilmBase createFilm()
protected abstract ActorBase createActor()
protected abstract java.lang.String getLikeExpression()
protected abstract FilmBase createFilm(java.lang.Integer filmID, java.lang.String filmName, java.lang.Integer duration, java.sql.Timestamp creationDate, java.lang.Long longField, java.lang.Float floatField)
filmID - Film IdfilmName - Film nameduration - DurationcreationDate - Creation datelongField - Long fieldfloatField - Float fieldprotected abstract ActorBase createActor(java.lang.Integer actorId, java.lang.String actorName, java.lang.Integer filmId)
actorId - Actor IdactorName - Actor namefilmId - Film idpublic void setUp()
throws java.lang.Exception
java.lang.Exception - Exception thrownprotected void testReadLastFilmElement(FilmBase objectToCheck) throws DDBSToolkitException
objectToCheck - Object to checkDDBSToolkitException - Toolkit exceptionprotected void compareFilmElement(FilmBase referenceObject, FilmBase objectToCheck)
referenceObject - Reference objectobjectToCheck - Object to checkpublic void testIsOpen()
throws java.lang.Exception
java.lang.Exception - Exception thrownpublic void testAddNullValue()
throws DDBSToolkitException
DDBSToolkitException - Toolkit exceptionpublic void testAdd()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testListAllWithNullValue()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testListAll()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionspublic void testReadNullValue()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testRead()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testReadLastElementNullValue()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit Exceptionpublic void testUpdateNullValue()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testUpdate()
throws DDBSToolkitException
DDBSToolkitException - Toolkit exceptionpublic void testDeleteNullValue()
throws DDBSToolkitException
DDBSToolkitException - Toolkit exceptionpublic void testDelete()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit Exceptionpublic void testLoadArrayNullValue1stParameter()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testLoadArrayNullValue2ndParameter()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testLoadArrayEmptyParameter()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testLoadArray()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionprotected java.util.Map<java.lang.String,FilmBase> createSampleData() throws DDBSToolkitException
DDBSToolkitException - Toolkit exceptionpublic void testConditionEquals()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionNotEquals()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionLessThan()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionGreaterThan()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionLessThanOrEqual()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionGreaterThanOrEqual()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionBetween()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionNotBetween()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionLike()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionIn()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionNotIn()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionIsNull()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testConditionNotNull()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testTransactionsAdd()
throws DDBSToolkitException
DDBSToolkitException - DDBS Toolkit exceptionpublic void testTransactionUpdate()
throws java.lang.Exception
DDBSToolkitException - DDBS Toolkit exceptionjava.lang.Exceptionpublic void testTransactionDelete()
throws java.lang.Exception
DDBSToolkitException - DDBS Toolkit exceptionjava.lang.Exception