()
| 246 | } |
| 247 | |
| 248 | @Test |
| 249 | public void storeRuleMege() throws Exception { |
| 250 | setupStorage(); |
| 251 | final TreeRule rule = new TreeRule(1); |
| 252 | rule.setLevel(2); |
| 253 | rule.setOrder(1); |
| 254 | rule.setNotes("Just some notes"); |
| 255 | assertTrue(rule.syncToStorage(storage.getTSDB(), false).joinUninterruptibly()); |
| 256 | assertEquals(2, storage.numColumns(TREE_TABLE, new byte[] { 0, 1 })); |
| 257 | final TreeRule stored = JSON.parseToObject( |
| 258 | storage.getColumn(TREE_TABLE, new byte[] { 0, 1 }, Tree.TREE_FAMILY(), |
| 259 | "tree_rule:2:1".getBytes(MockBase.ASCII())), TreeRule.class); |
| 260 | assertEquals("Host owner", stored.getDescription()); |
| 261 | assertEquals("Just some notes", stored.getNotes()); |
| 262 | } |
| 263 | |
| 264 | @Test (expected = IllegalArgumentException.class) |
| 265 | public void storeRuleBadID0() throws Exception { |
nothing calls this directly
no test coverage detected