public void ZNodeShouldBeDeletedWhenDeleting()
        {
            string path = "/TestDelete";

            DeletePreviousData(path);
            Stat stat = CreateNodeWithdata(path, "Test Delete");

            byte[] returnedRawData = ZkActions.GetData(path, false, stat);
            Assert.AreEqual("Test Delete", TextConvertor.GetSTextFromBytesAscii(returnedRawData));
            ZkActions.Delete(path, stat.Version);
        }
        public void NewZNodeShouldExistsWithTheInsertedDataAfterCreation()
        {
            string path = "/TestCreate";

            DeletePreviousData(path);
            byte[] testRawData = TextConvertor.GetBytesFromTextAscii("Test Create");
            ZkActions.Create(path, testRawData, Ids.OPEN_ACL_UNSAFE, CreateMode.Ephemeral);
            Stat stat = ZkActions.Exists(path, false);

            byte[] returnedRawData = ZkActions.GetData(path, false, stat);
            Assert.AreEqual("Test Create", TextConvertor.GetSTextFromBytesAscii(returnedRawData));
        }
        public void ExisitingdataShouldBeUpdatedOnUpdate()
        {
            string path = "/TestSetData";

            DeletePreviousData(path);
            Stat stat = CreateNodeWithdata(path, "Test Update");

            byte[] returnedRawData = ZkActions.GetData(path, false, stat);
            Assert.AreEqual("Test Update", TextConvertor.GetSTextFromBytesAscii(returnedRawData));
            ZkActions.SetData(path, TextConvertor.GetBytesFromTextAscii("Updated"), stat.Version);
            byte[] returnedUpdatedRawData = ZkActions.GetData(path, false, stat);
            Assert.AreEqual("Updated", TextConvertor.GetSTextFromBytesAscii(returnedUpdatedRawData));
        }