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 }));
        }
예제 #2
0
 public void Commit()
 {
     _originalData.RevertToCopiedData();
     SetCachedHasChangedFlag(false);
 }