Package com.reallifedeveloper.tools.test.database.inmemory
package com.reallifedeveloper.tools.test.database.inmemory
Support classes for creating in-memory repositories.
This kind of repository is useful for quickly testing, for example, services.
For testing real repositories, DbUnit can be used (see
AbstractDbTest
).
- Author:
- RealLifeDeveloper
-
ClassDescriptionAbstractInMemoryCrudRepository<T,
ID extends Comparable<ID>> An abstract helper class that implements theCrudRepository
interface using an in-memory map instead of a database.InMemoryJpaRepository<T,ID extends Comparable<ID>> An implementation of the Spring Data JPAJpaRepository
interface that holds entities in a map.A primary key generator that generates a sequence of integers.A primary key generator that generates a sequence of long integers.A generator of primary keys of a certain type.A helper class to assist with sorting lists in accordance withorg.springframework.data.domain.Sort
instances.A primary key generator that generates random UUIDs.