Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
69 additions
and
15 deletions.
There are no files selected for viewing
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
36 changes: 36 additions & 0 deletions
36
src/test/java/org/usergrid/vx/experimental/IntraOpUnitTest.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.usergrid.vx.experimental; | ||
|
||
import org.junit.Test; | ||
|
||
import static junit.framework.Assert.assertTrue; | ||
import static junit.framework.Assert.fail; | ||
|
||
/** | ||
* @author zznate | ||
*/ | ||
public class IntraOpUnitTest { | ||
|
||
@Test | ||
public void validateOk() { | ||
IntraOp op = IntraOp.listColumnFamilyOp("mykeyspace"); | ||
op = IntraOp.consistencyOp("QUORUM"); | ||
op = IntraOp.createKsOp("mykeyspace",1); | ||
op = IntraOp.getOp("rowkey","colname"); | ||
op = IntraOp.setOp("rowkey","colname","colvalue"); | ||
op = IntraOp.sliceOp("rowkey","start","end",10); | ||
op = IntraOp.sliceOp("rowkey", null, null, 10); | ||
op = IntraOp.createCfOp("MyCf"); | ||
op = IntraOp.createKsOp("MyKeyspace",3); | ||
try { | ||
op = IntraOp.createKsOp("mykeyspace",0); | ||
fail(op.getType().toString()); | ||
} catch (IllegalArgumentException iae) {} // nom nom nom | ||
|
||
try { | ||
op = IntraOp.consistencyOp("foo"); | ||
fail(op.getType().toString()); | ||
} catch (IllegalArgumentException iae) {} // nom nom nom | ||
|
||
} | ||
|
||
} |