use of org.jnosql.diana.api.column.ColumnDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultColumnTemplateAsyncTest method shouldDeleteCallBack.
@Test
public void shouldDeleteCallBack() {
ColumnDeleteQuery query = delete().from("delete").build();
Consumer<Void> callback = v -> {
};
subject.delete(query, callback);
verify(managerMock).delete(query, callback);
}
use of org.jnosql.diana.api.column.ColumnDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultColumnTemplateAsyncTest method shouldDeleteByEntityCallBack.
@Test
public void shouldDeleteByEntityCallBack() {
Consumer<Void> callback = v -> {
};
subject.delete(Person.class, 10L, callback);
ArgumentCaptor<ColumnDeleteQuery> queryCaptor = ArgumentCaptor.forClass(ColumnDeleteQuery.class);
verify(managerMock).delete(queryCaptor.capture(), Mockito.eq(callback));
ColumnDeleteQuery query = queryCaptor.getValue();
assertEquals("Person", query.getColumnFamily());
assertEquals(ColumnCondition.eq(Column.of("_id", 10L)), query.getCondition().get());
}
use of org.jnosql.diana.api.column.ColumnDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultColumnTemplateAsyncTest method shouldDeleteByEntity.
@Test
public void shouldDeleteByEntity() {
subject.delete(Person.class, 10L);
ArgumentCaptor<ColumnDeleteQuery> queryCaptor = ArgumentCaptor.forClass(ColumnDeleteQuery.class);
verify(managerMock).delete(queryCaptor.capture());
ColumnDeleteQuery query = queryCaptor.getValue();
assertEquals("Person", query.getColumnFamily());
assertEquals(ColumnCondition.eq(Column.of("_id", 10L)), query.getCondition().get());
}
use of org.jnosql.diana.api.column.ColumnDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultColumnTemplateAsyncTest method shouldDelete.
@Test
public void shouldDelete() {
ColumnDeleteQuery query = delete().from("delete").build();
subject.delete(query);
verify(managerMock).delete(query);
}
use of org.jnosql.diana.api.column.ColumnDeleteQuery in project jnosql-artemis by eclipse.
the class DefaultColumnTemplateTest method shouldDelete.
@Test
public void shouldDelete() {
ColumnDeleteQuery query = ColumnQueryBuilder.delete().from("delete").build();
subject.delete(query);
verify(managerMock).delete(query);
}
Aggregations