Search in sources :

Example 11 with BucketManager

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

the class CouchbaseListTest method afterClass.

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

Example 12 with BucketManager

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

the class CouchbaseMapTest method afterClass.

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

Example 13 with BucketManager

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

the class DefaultCouchbaseBucketManagerFactoryTest method shouldReturnManager.

@Test
public void shouldReturnManager() {
    BucketManager database = factory.getBucketManager(CouchbaseUtil.BUCKET_NAME);
    assertNotNull(database);
}
Also used : BucketManager(org.jnosql.diana.api.key.BucketManager) Test(org.junit.jupiter.api.Test)

Example 14 with BucketManager

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

the class DefaultKeyValueTemplateProducerTest method shouldReturn.

@Test
public void shouldReturn() {
    BucketManager manager = Mockito.mock(BucketManager.class);
    KeyValueTemplate repository = producer.get(manager);
    assertNotNull(repository);
}
Also used : BucketManager(org.jnosql.diana.api.key.BucketManager) Test(org.junit.jupiter.api.Test)

Example 15 with BucketManager

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

the class KeyValueRepositoryBean method create.

@Override
public KeyValueTemplate create(CreationalContext<KeyValueTemplate> creationalContext) {
    KeyValueTemplateProducer producer = getInstance(KeyValueTemplateProducer.class);
    BucketManager manager = getManager();
    return producer.get(manager);
}
Also used : KeyValueTemplateProducer(org.jnosql.artemis.key.KeyValueTemplateProducer) BucketManager(org.jnosql.diana.api.key.BucketManager)

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