public void Set_take_snapshot() { StateDb db = new StateDb(new MemDb()); db.Set(_hash1, _bytes1); Assert.AreEqual(0, db.TakeSnapshot()); }
public void Restore_in_the_middle() { StateDb db = new StateDb(new MemDb()); db.Set(_hash1, _bytes1); int snapshot = db.TakeSnapshot(); db.Set(_hash2, _bytes2); db.Restore(snapshot); byte[] getResult = db.Get(_hash2); Assert.IsNull(getResult); }
public void Initial_take_snapshot() { StateDb db = new StateDb(new MemDb()); Assert.AreEqual(-1, db.TakeSnapshot()); }