use of org.jnosql.diana.api.key.KeyValueEntity in project jnosql-diana-driver by eclipse.
the class RiakBucketManagerTest method shouldMultiGet.
@Test
public void shouldMultiGet() {
User user = new User("otavio");
KeyValueEntity keyValue = KeyValueEntity.of("otavio", Value.of(user));
keyValueEntityManager.put(keyValue);
assertNotNull(keyValueEntityManager.get("otavio"));
}
use of org.jnosql.diana.api.key.KeyValueEntity in project jnosql-diana-driver by eclipse.
the class KeyValueEntityManagerTest method shouldMultiGet.
@Test
public void shouldMultiGet() {
User user = new User("otavio");
KeyValueEntity keyValue = KeyValueEntity.of("otavio", Value.of(user));
keyValueEntityManager.put(keyValue);
assertNotNull(keyValueEntityManager.get("otavio"));
}
use of org.jnosql.diana.api.key.KeyValueEntity in project jnosql-diana-driver by eclipse.
the class HazelcastBucketManagerTest method shouldMultiGet.
@Test
public void shouldMultiGet() {
User user = new User("otavio");
KeyValueEntity keyValue = KeyValueEntity.of("otavio", Value.of(user));
keyValueEntityManager.put(keyValue);
assertNotNull(keyValueEntityManager.get("otavio"));
}
use of org.jnosql.diana.api.key.KeyValueEntity in project jnosql-diana-driver by eclipse.
the class CouchbaseBucketManagerTest method shouldMultiGet.
@Test
public void shouldMultiGet() {
User user = new User(KEY_OTAVIO);
KeyValueEntity keyValue = KeyValueEntity.of(KEY_OTAVIO, Value.of(user));
keyValueEntityManager.put(keyValue);
assertNotNull(keyValueEntityManager.get(KEY_OTAVIO));
}
use of org.jnosql.diana.api.key.KeyValueEntity in project jnosql-artemis by eclipse.
the class DefaultKeyValueTemplateTest method shouldPutTTL.
@Test
public void shouldPutTTL() {
Duration duration = Duration.ofSeconds(2L);
User user = new User(KEY, "otavio", 27);
subject.put(user, duration);
Mockito.verify(manager).put(captor.capture(), Mockito.eq(duration));
KeyValueEntity entity = captor.getValue();
assertEquals(KEY, entity.getKey());
assertEquals(user, entity.getValue().get());
}