Search in sources :

Example 6 with SchemaApiTestV2Table

use of com.palantir.atlasdb.table.description.generated.SchemaApiTestV2Table in project atlasdb by palantir.

the class SchemaApiTestV2Impl method testUpdateEntryIfEntryDoesNotExist.

@Test
public void testUpdateEntryIfEntryDoesNotExist() {
    AbstractTransaction transaction = mock(AbstractTransaction.class);
    SchemaApiTestV2Table table = spy(tableFactory.getSchemaApiTestV2Table(transaction));
    doReturn(Optional.empty()).when(table).getColumn1(TEST_ROW_KEY);
    table.updateColumn1(TEST_ROW_KEY, entry -> entry + 1);
    verify(table, never()).putColumn1(any(), anyLong());
}
Also used : SchemaApiTestV2Table(com.palantir.atlasdb.table.description.generated.SchemaApiTestV2Table) AbstractTransaction(com.palantir.atlasdb.transaction.impl.AbstractTransaction) Test(org.junit.Test)

Example 7 with SchemaApiTestV2Table

use of com.palantir.atlasdb.table.description.generated.SchemaApiTestV2Table in project atlasdb by palantir.

the class SchemaApiTestV2Impl method deleteWholeRow.

@Override
protected void deleteWholeRow(Transaction transaction, String rowKey) {
    SchemaApiTestV2Table table = tableFactory.getSchemaApiTestV2Table(transaction);
    table.deleteRow(rowKey);
}
Also used : SchemaApiTestV2Table(com.palantir.atlasdb.table.description.generated.SchemaApiTestV2Table)

Aggregations

SchemaApiTestV2Table (com.palantir.atlasdb.table.description.generated.SchemaApiTestV2Table)7 AbstractTransaction (com.palantir.atlasdb.transaction.impl.AbstractTransaction)2 Test (org.junit.Test)2 RangeRequest (com.palantir.atlasdb.keyvalue.api.RangeRequest)1 Matchers.anyLong (org.mockito.Matchers.anyLong)1