/// <summary> /// Tests that update should throw IOE, if version number modifies between read /// and update /// </summary> /// <exception cref="System.Exception"/> public virtual void TestUpdateShouldFailWithIOEIfVersionNumberChangedAfterRead() { CurrentInprogress ci = new CurrentInprogress(zkc, CurrentNodePath); ci.Init(); ci.Update("myInprogressZnode"); NUnit.Framework.Assert.AreEqual("Not returning myInprogressZnode", "myInprogressZnode" , ci.Read()); // Updating data in-between to change the data to change the version number ci.Update("YourInprogressZnode"); ci.Update("myInprogressZnode"); }
public virtual void TestReadShouldReturnTheZnodePathAfterUpdate() { string data = "inprogressNode"; CurrentInprogress ci = new CurrentInprogress(zkc, CurrentNodePath); ci.Init(); ci.Update(data); string inprogressNodePath = ci.Read(); NUnit.Framework.Assert.AreEqual("Not returning inprogressZnode", "inprogressNode" , inprogressNodePath); }
public virtual void TestReadShouldReturnNullAfterClear() { CurrentInprogress ci = new CurrentInprogress(zkc, CurrentNodePath); ci.Init(); ci.Update("myInprogressZnode"); ci.Read(); ci.Clear(); string inprogressNodePath = ci.Read(); NUnit.Framework.Assert.AreEqual("Expecting null to be return", null, inprogressNodePath ); }