protected override InstanceMemento[] fetchInternalMementos() { InstanceMemento[] rawMementos = _innerSource.GetAllMementos(); var returnValue = new InstanceMemento[rawMementos.Length]; for (int i = 0; i < returnValue.Length; i++) { returnValue[i] = resolveMemento(rawMementos[i]); } return returnValue; }
public void GetAll() { // There are 4 Rules defined in the XML file InstanceMemento[] mementos = source.GetAllMementos(); Assert.IsNotNull(mementos); Assert.AreEqual(4, mementos.Length, "4 mementos from 4 XML nodes"); foreach (InstanceMemento memento in mementos) { Assert.IsNotNull(memento); } }
public void AddMementoSource(MementoSource source) { _mementoList.AddRange(source.GetAllMementos()); }