Search in sources :

Example 6 with ColumnFamilyManager

use of org.jnosql.diana.api.column.ColumnFamilyManager in project jnosql-artemis by eclipse.

the class MockProducer method getColumnFamilyManagerMock.

@Produces
@Database(value = DatabaseType.COLUMN, provider = "columnRepositoryMock")
public ColumnFamilyManager getColumnFamilyManagerMock() {
    ColumnEntity entity = ColumnEntity.of("Person");
    entity.add(org.jnosql.diana.api.column.Column.of("name", "columnRepositoryMock"));
    entity.add(org.jnosql.diana.api.column.Column.of("age", 10));
    ColumnFamilyManager manager = mock(ColumnFamilyManager.class);
    when(manager.insert(Mockito.any(ColumnEntity.class))).thenReturn(entity);
    return manager;
}
Also used : ColumnEntity(org.jnosql.diana.api.column.ColumnEntity) ColumnFamilyManager(org.jnosql.diana.api.column.ColumnFamilyManager) Produces(javax.enterprise.inject.Produces)

Aggregations

ColumnFamilyManager (org.jnosql.diana.api.column.ColumnFamilyManager)6 Produces (javax.enterprise.inject.Produces)3 ColumnEntity (org.jnosql.diana.api.column.ColumnEntity)3 Test (org.junit.jupiter.api.Test)2 ColumnTemplateProducer (org.jnosql.artemis.column.ColumnTemplateProducer)1