Ejemplo n.º 1
0
        public void MomentoElementWriteTest()
        {
            Element        element = new Element();
            ElementMomento momento = new ElementMomento(element);

            momento.WriteItem(element);
        }
Ejemplo n.º 2
0
        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.");
        }
Ejemplo n.º 3
0
 public void MomentoElementCreateTest()
 {
     Element        element  = new Element();
     ElementMomento momento  = new ElementMomento(element);
     Element        element2 = momento.CreateItem();
 }