Search in sources :

Example 6 with DocumentCollectionManagerFactory

use of jakarta.nosql.document.DocumentCollectionManagerFactory in project jnosql-diana-driver by eclipse.

the class OrientDBDocumentConfigurationTest method shouldCreateDocumentCollectionManagerFactory.

@Test
public void shouldCreateDocumentCollectionManagerFactory() {
    OrientDBDocumentConfiguration configuration = new OrientDBDocumentConfiguration();
    configuration.setHost("172.17.0.2");
    configuration.setUser("root");
    configuration.setPassword("rootpwd");
    DocumentCollectionManagerFactory managerFactory = configuration.get();
    assertNotNull(managerFactory);
}
Also used : DocumentCollectionManagerFactory(jakarta.nosql.document.DocumentCollectionManagerFactory) Test(org.junit.jupiter.api.Test)

Example 7 with DocumentCollectionManagerFactory

use of jakarta.nosql.document.DocumentCollectionManagerFactory in project jnosql-diana-driver by eclipse.

the class OrientDBDocumentConfigurationTest method shouldCreateByConfigurationFile.

@Test
public void shouldCreateByConfigurationFile() {
    OrientDBDocumentConfiguration configuration = new OrientDBDocumentConfiguration();
    DocumentCollectionManagerFactory managerFactory = configuration.get();
    assertNotNull(managerFactory);
}
Also used : DocumentCollectionManagerFactory(jakarta.nosql.document.DocumentCollectionManagerFactory) Test(org.junit.jupiter.api.Test)

Example 8 with DocumentCollectionManagerFactory

use of jakarta.nosql.document.DocumentCollectionManagerFactory in project jnosql-diana-driver by eclipse.

the class RavenDBDocumentConfigurationTest method shouldCreateDocumentCollectionManagerFactoryByFile.

@Test
public void shouldCreateDocumentCollectionManagerFactoryByFile() {
    DocumentConfiguration configuration = new RavenDBDocumentConfiguration();
    DocumentCollectionManagerFactory managerFactory = configuration.get();
    assertNotNull(managerFactory);
}
Also used : DocumentCollectionManagerFactory(jakarta.nosql.document.DocumentCollectionManagerFactory) DocumentConfiguration(jakarta.nosql.document.DocumentConfiguration) Test(org.junit.jupiter.api.Test)

Example 9 with DocumentCollectionManagerFactory

use of jakarta.nosql.document.DocumentCollectionManagerFactory in project jnosql-diana by eclipse.

the class DocumentCollectionManagerConverter method success.

@Override
public DocumentCollectionManager success(String value) {
    Config config = BeanManagers.getInstance(Config.class);
    final DocumentCollectionManagerFactory managerFactory = config.getValue(value, DocumentCollectionManagerFactory.class);
    final String database = value + ".database";
    final String entity = config.getValue(database, String.class);
    return managerFactory.get(entity);
}
Also used : Config(org.eclipse.microprofile.config.Config) DocumentCollectionManagerFactory(jakarta.nosql.document.DocumentCollectionManagerFactory)

Example 10 with DocumentCollectionManagerFactory

use of jakarta.nosql.document.DocumentCollectionManagerFactory in project jnosql-diana-driver by eclipse.

the class RavenDBDocumentConfigurationTest method shouldCreateDocumentCollectionManagerFactoryByMap.

@Test
public void shouldCreateDocumentCollectionManagerFactoryByMap() {
    Map<String, Object> map = new HashMap<>();
    map.put("ravendb-server-host-1", "172.17.0.2:8080");
    RavenDBDocumentConfiguration configuration = new RavenDBDocumentConfiguration();
    DocumentCollectionManagerFactory managerFactory = configuration.get(Settings.of(map));
    assertNotNull(managerFactory);
}
Also used : HashMap(java.util.HashMap) DocumentCollectionManagerFactory(jakarta.nosql.document.DocumentCollectionManagerFactory) Test(org.junit.jupiter.api.Test)

Aggregations

DocumentCollectionManagerFactory (jakarta.nosql.document.DocumentCollectionManagerFactory)16 Test (org.junit.jupiter.api.Test)15 DocumentConfiguration (jakarta.nosql.document.DocumentConfiguration)3 HashMap (java.util.HashMap)2 Settings (jakarta.nosql.Settings)1 DocumentCollectionManagerFactoryMock (org.eclipse.jnosql.mapping.document.configuration.DocumentConfigurationMock.DocumentCollectionManagerFactoryMock)1 Config (org.eclipse.microprofile.config.Config)1