Examples of CommandStack


Examples of org.gdbms.engine.data.command.CommandStack

        assertTrue(cs.canRedo());
        assertTrue(!cs.canUndo());
    }
   
    public void testPutUndoPut() throws Exception {
        CommandStack cs = new CommandStack();
        cs.setUseLimit(false);
       
        cs.put(new C(1));
        cs.put(new C(2));
        cs.put(new C(3));
        cs.put(new C(4));
        assertTrue(cs.undo().equals(new C(4)));
        assertTrue(cs.undo().equals(new C(3)));
        assertTrue(cs.undo().equals(new C(2)));
        assertTrue(cs.redo().equals(new C(2)));
        assertTrue(cs.canRedo());
        cs.put(new C(3));
        assertTrue(!cs.canRedo());
        assertTrue(cs.canUndo());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.