Exemplo n.º 1
0
 @Test
 public void containsKeyColumnReturnsFalseOnNonexistentInput() throws Exception {
   TransactionHandle txn = manager.beginTransaction();
   ByteBuffer key1 = KeyColumnValueStoreUtil.longToByteBuffer(1);
   ByteBuffer c = KeyColumnValueStoreUtil.stringToByteBuffer("c");
   assertFalse(store.containsKeyColumn(key1.duplicate(), c.duplicate(), txn));
   txn.commit();
 }
Exemplo n.º 2
0
  @Test
  public void containsKeyColumnReturnsTrueOnExtantInput() throws Exception {
    TransactionHandle txn = manager.beginTransaction();
    KeyColumnValueStoreUtil.insert(store, txn, 1, "c", "v");
    txn.commit();

    txn = manager.beginTransaction();
    ByteBuffer key1 = KeyColumnValueStoreUtil.longToByteBuffer(1);
    ByteBuffer c = KeyColumnValueStoreUtil.stringToByteBuffer("c");
    assertTrue(store.containsKeyColumn(key1.duplicate(), c.duplicate(), txn));
    txn.commit();
  }