public void testRoundTrip() { MultiTransactionRecord request = new MultiTransactionRecord(); request.add(Op.check("check", 1)); request.add(Op.create("create", "create data".getBytes(), ZooDefs.Ids.CREATOR_ALL_ACL, (int)ZooDefs.Perms.ALL)); request.add(Op.delete("delete", 17)); request.add(Op.setData("setData", "set data".getBytes(), 19)); MultiTransactionRecord decodedRequest = codeDecode(request); Assert.assertEquals(request, decodedRequest); }
/// <summary> /// Constructs a delete operation. Arguments are as for the ZooKeeper method of the same name. /// </summary> /// <param name="path"> /// the path of the node to be deleted. /// </param> /// <param name="version"> /// the expected node version. /// </param> public Transaction delete(string path, int version = -1) { ops.Add(Op.delete(path, version)); return(this); }