Class DbUnitFlatXmlReaderTest
java.lang.Object
com.reallifedeveloper.tools.test.database.dbunit.DbUnitFlatXmlReaderTest
- All Implemented Interfaces:
DatabaseReaderTestCases
We run this test using in-memory repositories to verify that the
CrudRepositoryWriter works with this repository type.- Author:
- RealLifeDeveloper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.repository.CrudRepository<DbUnitTestEntity, Integer> voidRead one or more files with information aboutSbUnitTestEntityobjects and save them in a repository.voidRead a file with information aboutTestEntityobjects and save them in a repository.voidRead a file with information aboutTestEntityobjects, but with thenameattribute misspelled asnamex.voidRead a file with information aboutTestEntityobjects, but missing theidattribute.voidTry to readTestEntityinformation from a non-existing file named/no/such/file.voidTry to readTestEntityinformation from a file withDeUnitTestEntityobject information.voidorg.springframework.data.repository.CrudRepository<TestEntity, Long> Methods 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, verifyThatRepositoriesAreEmptiedBetweenTests
-
Constructor Details
-
DbUnitFlatXmlReaderTest
public DbUnitFlatXmlReaderTest()
-
-
Method Details
-
testEntityRepository
- Specified by:
testEntityRepositoryin interfaceDatabaseReaderTestCases
-
dbUnitTestEntityRepository
public org.springframework.data.repository.CrudRepository<DbUnitTestEntity,Integer> dbUnitTestEntityRepository()- Specified by:
dbUnitTestEntityRepositoryin interfaceDatabaseReaderTestCases
-
readTestEntityFile
Description copied from interface:DatabaseReaderTestCasesRead a file with information aboutTestEntityobjects and save them in a repository.- Specified by:
readTestEntityFilein interfaceDatabaseReaderTestCases- Throws:
Exception- if something goes wrong
-
readDbUnitTestEntityFiles
Description copied from interface:DatabaseReaderTestCasesRead one or more files with information aboutSbUnitTestEntityobjects and save them in a repository.- Specified by:
readDbUnitTestEntityFilesin interfaceDatabaseReaderTestCases- Throws:
Exception- if something goes wrong
-
readTestEntityFromWrongTypeOfFile
Description copied from interface:DatabaseReaderTestCasesTry to readTestEntityinformation from a file withDeUnitTestEntityobject information.- Specified by:
readTestEntityFromWrongTypeOfFilein interfaceDatabaseReaderTestCases- Throws:
Exception- if something goes wrong
-
readTestEntityFileWithIncorrectAttribute
Description copied from interface:DatabaseReaderTestCasesRead a file with information aboutTestEntityobjects, but with thenameattribute misspelled asnamex.- Specified by:
readTestEntityFileWithIncorrectAttributein interfaceDatabaseReaderTestCases- Throws:
Exception- if something goes wrong
-
readTestEntityFileWithNoIdAttribute
Description copied from interface:DatabaseReaderTestCasesRead a file with information aboutTestEntityobjects, but missing theidattribute.- Specified by:
readTestEntityFileWithNoIdAttributein interfaceDatabaseReaderTestCases- Throws:
Exception- if something goes wrong
-
readTestEntityFromNonExistingFile
Description copied from interface:DatabaseReaderTestCasesTry to readTestEntityinformation from a non-existing file named/no/such/file.- Specified by:
readTestEntityFromNonExistingFilein interfaceDatabaseReaderTestCases- Throws:
Exception- if something goes wrong
-
readWrongTypeOfFile
- Specified by:
readWrongTypeOfFilein interfaceDatabaseReaderTestCases- Throws:
Exception
-