Class DbUnitFlatXmlReaderTest
java.lang.Object
com.reallifedeveloper.tools.test.database.dbunit.DbUnitFlatXmlReaderTest
- All Implemented Interfaces:
DatabaseReaderTestCases
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreadDbUnitTestEntityFiles(org.springframework.data.repository.CrudRepository<DbUnitTestEntity, Integer> repository) Read one or more files with information aboutSbUnitTestEntityobjects and save them in a repository.voidreadTestEntityFile(org.springframework.data.repository.CrudRepository<TestEntity, Long> repository) Read a file with information aboutTestEntityobjects and save them in a repository.voidreadTestEntityFileWithIncorrectAttribute(org.springframework.data.repository.CrudRepository<TestEntity, Long> repository) Read a file with information aboutTestEntityobjects, but with thenameattribute misspelled asnamex.voidreadTestEntityFileWithNoIdAttribute(org.springframework.data.repository.CrudRepository<TestEntity, Long> repository) Read a file with information aboutTestEntityobjects, but missing theidattribute.voidreadTestEntityFromNonExistingFile(org.springframework.data.repository.CrudRepository<TestEntity, Long> repository) Try to readTestEntityinformation from a non-existing file named/no/such/file.voidreadTestEntityFromWrongTypeOfFile(org.springframework.data.repository.CrudRepository<TestEntity, Long> repository) Try to readTestEntityinformation from a file withDeUnitTestEntityobject information.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.reallifedeveloper.tools.test.database.dbunit.DatabaseReaderTestCases
readFileForEntityWithAssociations, readFileForEntityWithMissingAssociations, readFileForSimpleEntity, readFileWithIncorrectAttribute, readFileWithoutIdAttributeAndNoPrimaryKeyGenerator, readNonExistingFile
-
Constructor Details
-
DbUnitFlatXmlReaderTest
public DbUnitFlatXmlReaderTest()
-
-
Method Details
-
readTestEntityFile
public void readTestEntityFile(org.springframework.data.repository.CrudRepository<TestEntity, Long> repository) throws ExceptionDescription copied from interface:DatabaseReaderTestCasesRead a file with information aboutTestEntityobjects and save them in a repository.- Specified by:
readTestEntityFilein interfaceDatabaseReaderTestCases- Parameters:
repository- the repository in which to save the entities- Throws:
Exception- if something goes wrong
-
readDbUnitTestEntityFiles
public void readDbUnitTestEntityFiles(org.springframework.data.repository.CrudRepository<DbUnitTestEntity, Integer> repository) throws ExceptionDescription copied from interface:DatabaseReaderTestCasesRead one or more files with information aboutSbUnitTestEntityobjects and save them in a repository.- Specified by:
readDbUnitTestEntityFilesin interfaceDatabaseReaderTestCases- Parameters:
repository- the repository in which to save the entities- Throws:
Exception- if something goes wrong
-
readTestEntityFromWrongTypeOfFile
public void readTestEntityFromWrongTypeOfFile(org.springframework.data.repository.CrudRepository<TestEntity, Long> repository) throws ExceptionDescription copied from interface:DatabaseReaderTestCasesTry to readTestEntityinformation from a file withDeUnitTestEntityobject information.- Specified by:
readTestEntityFromWrongTypeOfFilein interfaceDatabaseReaderTestCases- Parameters:
repository- the repository in which to save the entities- Throws:
Exception- if something goes wrong
-
readTestEntityFileWithIncorrectAttribute
public void readTestEntityFileWithIncorrectAttribute(org.springframework.data.repository.CrudRepository<TestEntity, Long> repository) throws ExceptionDescription copied from interface:DatabaseReaderTestCasesRead a file with information aboutTestEntityobjects, but with thenameattribute misspelled asnamex.- Specified by:
readTestEntityFileWithIncorrectAttributein interfaceDatabaseReaderTestCases- Parameters:
repository- the repository in which to save the entities- Throws:
Exception- if something goes wrong
-
readTestEntityFileWithNoIdAttribute
public void readTestEntityFileWithNoIdAttribute(org.springframework.data.repository.CrudRepository<TestEntity, Long> repository) throws ExceptionDescription copied from interface:DatabaseReaderTestCasesRead a file with information aboutTestEntityobjects, but missing theidattribute.- Specified by:
readTestEntityFileWithNoIdAttributein interfaceDatabaseReaderTestCases- Parameters:
repository- the repository in which to save the entities- Throws:
Exception- if something goes wrong
-
readTestEntityFromNonExistingFile
public void readTestEntityFromNonExistingFile(org.springframework.data.repository.CrudRepository<TestEntity, Long> repository) throws ExceptionDescription copied from interface:DatabaseReaderTestCasesTry to readTestEntityinformation from a non-existing file named/no/such/file.- Specified by:
readTestEntityFromNonExistingFilein interfaceDatabaseReaderTestCases- Parameters:
repository- the repository in which to save the entities- Throws:
Exception- if something goes wrong
-
readWrongTypeOfFile
- Specified by:
readWrongTypeOfFilein interfaceDatabaseReaderTestCases- Throws:
Exception
-