Search in sources :

Example 6 with BucketManager

use of org.jnosql.diana.api.key.BucketManager in project jnosql-diana-driver by eclipse.

the class RedisBucketManagerFactoryTest method shouldCreateKeyValueEntityManager.

@Test
public void shouldCreateKeyValueEntityManager() {
    BucketManager keyValueEntityManager = managerFactory.getBucketManager(BUCKET_NAME);
    assertNotNull(keyValueEntityManager);
}
Also used : BucketManager(org.jnosql.diana.api.key.BucketManager) Test(org.junit.jupiter.api.Test)

Example 7 with BucketManager

use of org.jnosql.diana.api.key.BucketManager in project jnosql-artemis by eclipse.

the class MockProducer method getBucketManager.

@Produces
public BucketManager getBucketManager() {
    BucketManager bucketManager = Mockito.mock(BucketManager.class);
    Person person = Person.builder().withName("Default").build();
    when(bucketManager.get("key")).thenReturn(Optional.ofNullable(Value.of(person)));
    when(bucketManager.get("user")).thenReturn(Optional.of(Value.of(new User("Default", "Default", 10))));
    return bucketManager;
}
Also used : User(org.jnosql.artemis.model.User) BucketManager(org.jnosql.diana.api.key.BucketManager) Person(org.jnosql.artemis.model.Person) Produces(javax.enterprise.inject.Produces)

Example 8 with BucketManager

use of org.jnosql.diana.api.key.BucketManager in project jnosql-diana-driver by eclipse.

the class KeyValueEntityManagerFactoryTest method shouldCreateKeyValueEntityManager.

@Test
public void shouldCreateKeyValueEntityManager() {
    BucketManager keyValueEntityManager = managerFactory.getBucketManager(BUCKET_NAME);
    assertNotNull(keyValueEntityManager);
}
Also used : BucketManager(org.jnosql.diana.api.key.BucketManager) Test(org.junit.jupiter.api.Test)

Example 9 with BucketManager

use of org.jnosql.diana.api.key.BucketManager in project jnosql-diana-driver by eclipse.

the class KeyValueEntityManagerFactoryTest method shouldCreateKeyValueEntityManager.

@Test
public void shouldCreateKeyValueEntityManager() {
    BucketManager keyValueEntityManager = managerFactory.getBucketManager(BUCKET_NAME);
    assertNotNull(keyValueEntityManager);
}
Also used : BucketManager(org.jnosql.diana.api.key.BucketManager) Test(org.junit.jupiter.api.Test)

Example 10 with BucketManager

use of org.jnosql.diana.api.key.BucketManager in project jnosql-diana-driver by eclipse.

the class CouchbaseDocumentCollectionManagerTest method afterClass.

@AfterAll
public static void afterClass() {
    CouchbaseKeyValueConfiguration configuration = new CouchbaseKeyValueConfiguration();
    BucketManagerFactory keyValueEntityManagerFactory = configuration.get();
    BucketManager keyValueEntityManager = keyValueEntityManagerFactory.getBucketManager(CouchbaseUtil.BUCKET_NAME);
    keyValueEntityManager.remove("person:id");
}
Also used : CouchbaseKeyValueConfiguration(org.jnosql.diana.couchbase.key.CouchbaseKeyValueConfiguration) BucketManager(org.jnosql.diana.api.key.BucketManager) BucketManagerFactory(org.jnosql.diana.api.key.BucketManagerFactory) AfterAll(org.junit.jupiter.api.AfterAll)

Aggregations

BucketManager (org.jnosql.diana.api.key.BucketManager)16 BucketManagerFactory (org.jnosql.diana.api.key.BucketManagerFactory)8 AfterAll (org.junit.jupiter.api.AfterAll)8 Test (org.junit.jupiter.api.Test)5 CouchbaseKeyValueConfiguration (org.jnosql.diana.couchbase.key.CouchbaseKeyValueConfiguration)3 Produces (javax.enterprise.inject.Produces)2 Person (org.jnosql.artemis.model.Person)2 User (org.jnosql.artemis.model.User)2 KeyValueTemplateProducer (org.jnosql.artemis.key.KeyValueTemplateProducer)1