use of jakarta.nosql.document.DocumentCollectionManager in project jnosql-diana by eclipse.
the class DefaultSelectQueryBuilderTest method shouldExecuteManager.
@Test
public void shouldExecuteManager() {
DocumentCollectionManager manager = Mockito.mock(DocumentCollectionManager.class);
ArgumentCaptor<DocumentQuery> queryCaptor = ArgumentCaptor.forClass(DocumentQuery.class);
String collection = "collection";
Stream<DocumentEntity> entities = select().from(collection).getResult(manager);
Mockito.verify(manager).select(queryCaptor.capture());
checkQuery(queryCaptor, collection);
}
use of jakarta.nosql.document.DocumentCollectionManager in project jnosql-diana by eclipse.
the class ReactiveTemplateBean method create.
@Override
public ReactiveDocumentTemplate create(CreationalContext<ReactiveDocumentTemplate> context) {
DocumentTemplateProducer producer = getInstance(DocumentTemplateProducer.class);
DocumentCollectionManager manager = getManager();
return producer.get(manager);
}
Aggregations