Search in sources :

Example 1 with ColumnEntityPostPersist

use of jakarta.nosql.mapping.column.ColumnEntityPostPersist in project jnosql-diana by eclipse.

the class DefaultColumnEventPersistManagerTest method shouldFirePostColumn.

@Test
public void shouldFirePostColumn() {
    ColumnEntity entity = ColumnEntity.of("columnFamily");
    subject.firePostColumn(entity);
    ArgumentCaptor<ColumnEntityPostPersist> captor = ArgumentCaptor.forClass(ColumnEntityPostPersist.class);
    verify(columnEntityPostPersistEvent).fire(captor.capture());
    ColumnEntityPostPersist captorValue = captor.getValue();
    assertEquals(entity, captorValue.getEntity());
}
Also used : ColumnEntity(jakarta.nosql.column.ColumnEntity) ColumnEntityPostPersist(jakarta.nosql.mapping.column.ColumnEntityPostPersist) Test(org.junit.jupiter.api.Test)

Example 2 with ColumnEntityPostPersist

use of jakarta.nosql.mapping.column.ColumnEntityPostPersist in project jnosql-diana by eclipse.

the class ColumnEntityPostPersistTest method shouldReturnInstance.

@Test
public void shouldReturnInstance() {
    ColumnEntity entity = ColumnEntity.of("columnFamily");
    ColumnEntityPostPersist postPersist = new DefaultColumnEntityPostPersist(entity);
    assertEquals(entity, postPersist.getEntity());
}
Also used : ColumnEntity(jakarta.nosql.column.ColumnEntity) ColumnEntityPostPersist(jakarta.nosql.mapping.column.ColumnEntityPostPersist) Test(org.junit.jupiter.api.Test)

Aggregations

ColumnEntity (jakarta.nosql.column.ColumnEntity)2 ColumnEntityPostPersist (jakarta.nosql.mapping.column.ColumnEntityPostPersist)2 Test (org.junit.jupiter.api.Test)2