public void RevertToCopiedData() { _copyOnWriteData.CopyOnWrite(); _underlyingCopiedData.Remove(_domainObject1); _copyOnWriteData.RevertToCopiedData(); Assert.That(_copyOnWriteData.ToArray(), Is.EqualTo(new[] { _domainObject2 })); _underlyingCopiedData.Add(_domainObject3); Assert.That(_copyOnWriteData.ToArray(), Is.EqualTo(new[] { _domainObject2, _domainObject3 })); }
public void Commit() { _originalData.RevertToCopiedData(); SetCachedHasChangedFlag(false); }