Search in sources :

Example 1 with KeyValueEntityPostPersist

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

the class DefaultKeyValueEventPersistManagerTest method shouldFirePostColumn.

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

Aggregations

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