use of jakarta.nosql.mapping.document.DocumentEntityPostPersist in project jnosql-diana by eclipse.
the class DefaultDocumentEventPersistManagerTest method shouldFirePostDocument.
@Test
public void shouldFirePostDocument() {
DocumentEntity entity = DocumentEntity.of("collection");
subject.firePostDocument(entity);
ArgumentCaptor<DocumentEntityPostPersist> captor = ArgumentCaptor.forClass(DocumentEntityPostPersist.class);
verify(documentEntityPostPersistEvent).fire(captor.capture());
DocumentEntityPostPersist captorValue = captor.getValue();
assertEquals(entity, captorValue.getEntity());
}
use of jakarta.nosql.mapping.document.DocumentEntityPostPersist in project jnosql-diana by eclipse.
the class DocumentEntityPostPersistTest method shouldReturnInstance.
@Test
public void shouldReturnInstance() {
DocumentEntity entity = DocumentEntity.of("collection");
DocumentEntityPostPersist postPersist = new DefaultDocumentEntityPostPersist(entity);
assertEquals(entity, postPersist.getEntity());
}
Aggregations