use of org.springframework.data.mapping.context.PersistentEntities in project spring-data-commons by spring-projects.
the class MappingAuditableBeanWrapperFactoryUnitTests method setUp.
@Before
public void setUp() {
SampleMappingContext context = new SampleMappingContext();
context.getPersistentEntity(Sample.class);
context.getPersistentEntity(SampleWithInstant.class);
PersistentEntities entities = new PersistentEntities(Collections.singleton(context));
factory = new MappingAuditableBeanWrapperFactory(entities);
}
use of org.springframework.data.mapping.context.PersistentEntities in project spring-data-mongodb by spring-projects.
the class AuditingEntityCallbackUnitTests method setUp.
@BeforeEach
void setUp() {
MongoMappingContext mappingContext = new MongoMappingContext();
mappingContext.getPersistentEntity(Sample.class);
handler = spy(new IsNewAwareAuditingHandler(new PersistentEntities(Arrays.asList(mappingContext))));
callback = new AuditingEntityCallback(() -> handler);
}
use of org.springframework.data.mapping.context.PersistentEntities in project spring-data-mongodb by spring-projects.
the class AuditingEventListenerUnitTests method setUp.
@BeforeEach
void setUp() {
MongoMappingContext mappingContext = new MongoMappingContext();
mappingContext.getPersistentEntity(Sample.class);
handler = spy(new IsNewAwareAuditingHandler(new PersistentEntities(Arrays.asList(mappingContext))));
listener = new AuditingEventListener(() -> handler);
}
Aggregations