Search in sources :

Example 1 with KeyValueEntityPrePersist

use of jakarta.nosql.mapping.keyvalue.KeyValueEntityPrePersist in project jnosql-diana by eclipse.

the class DefaultKeyValueEventPersistManagerTest method shouldFirePreColumn.

@Test
public void shouldFirePreColumn() {
    KeyValueEntity entity = KeyValueEntity.of("key", "value");
    subject.firePreKeyValue(entity);
    ArgumentCaptor<KeyValueEntityPrePersist> captor = ArgumentCaptor.forClass(KeyValueEntityPrePersist.class);
    verify(keyValueEntityPrePersistEvent).fire(captor.capture());
    KeyValueEntityPrePersist captorValue = captor.getValue();
    assertEquals(entity, captorValue.getEntity());
}
Also used : KeyValueEntityPrePersist(jakarta.nosql.mapping.keyvalue.KeyValueEntityPrePersist) KeyValueEntity(jakarta.nosql.keyvalue.KeyValueEntity) Test(org.junit.jupiter.api.Test)

Aggregations

KeyValueEntity (jakarta.nosql.keyvalue.KeyValueEntity)1 KeyValueEntityPrePersist (jakarta.nosql.mapping.keyvalue.KeyValueEntityPrePersist)1 Test (org.junit.jupiter.api.Test)1