public void MomentoElementWriteTest() { Element element = new Element(); ElementMomento momento = new ElementMomento(element); momento.WriteItem(element); }
public void MomentoElementSubclassTest() { Shape shape = new Shape(); shape.MinimumSize = new SizeF(8, 8); ElementMomento momento = new ElementMomento(shape); shape.MinimumSize = new SizeF(0, 0); momento.WriteItem(shape); Assert.IsTrue(shape.MinimumSize == new SizeF(8, 8), "Subclassed type not recorded by memento."); }
public void MomentoElementCreateTest() { Element element = new Element(); ElementMomento momento = new ElementMomento(element); Element element2 = momento.CreateItem(); }