use of jakarta.nosql.mapping.document.DocumentEntityPrePersist in project jnosql-diana by eclipse.
the class DefaultDocumentEventPersistManagerTest method shouldFirePreDocument.
@Test
public void shouldFirePreDocument() {
DocumentEntity entity = DocumentEntity.of("collection");
subject.firePreDocument(entity);
ArgumentCaptor<DocumentEntityPrePersist> captor = ArgumentCaptor.forClass(DocumentEntityPrePersist.class);
verify(documentEntityPrePersistEvent).fire(captor.capture());
DocumentEntityPrePersist captorValue = captor.getValue();
assertEquals(entity, captorValue.getEntity());
}
use of jakarta.nosql.mapping.document.DocumentEntityPrePersist in project jnosql-diana by eclipse.
the class DocumentEntityPrePersistTest method shouldReturnInstance.
@Test
public void shouldReturnInstance() {
DocumentEntity entity = DocumentEntity.of("collection");
DocumentEntityPrePersist prePersist = new DefaultDocumentEntityPrePersist(entity);
assertEquals(entity, prePersist.getEntity());
}
Aggregations