Created
April 28, 2010 19:18
-
-
Save rantav/382575 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Test insertion of a supercolumn using insert | |
*/ | |
@Test | |
public void testInsertSuper() throws IllegalArgumentException, NoSuchElementException, | |
IllegalStateException, NotFoundException, Exception { | |
// insert value | |
ColumnPath cp = new ColumnPath("Super1"); | |
cp.setColumn(bytes("testInsertSuper_column")); | |
cp.setSuper_column(bytes("testInsertSuper_super")); | |
keyspace.insert("testInsertSuper_key", cp, bytes("testInsertSuper_value")); | |
// get value and assert | |
SuperColumn sc = keyspace.getSuperColumn("testInsertSuper_key", cp); | |
assertNotNull(sc); | |
assertEquals("testInsertSuper_super", string(sc.getName())); | |
assertEquals(1, sc.getColumns().size()); | |
assertEquals("testInsertSuper_value", string(sc.getColumns().get(0).getValue())); | |
// remove value | |
keyspace.remove("testInsertSuper_super", cp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment