Package org.gdbms.engine.data.command

Examples of org.gdbms.engine.data.command.CommandStack.canRedo()


    public void testNormal() throws Exception {
        CommandStack cs = new CommandStack();
        cs.setLimit(3);
        cs.setUseLimit(true);
       
        assertTrue(!cs.canRedo());
        assertTrue(!cs.canUndo());
       
        cs.put(new C());
        assertTrue(!cs.canRedo());
        assertTrue(cs.canUndo());
View Full Code Here


       
        assertTrue(!cs.canRedo());
        assertTrue(!cs.canUndo());
       
        cs.put(new C());
        assertTrue(!cs.canRedo());
        assertTrue(cs.canUndo());
       
        cs.put(new C());
        cs.put(new C());
        assertTrue(!cs.canRedo());
View Full Code Here

        assertTrue(!cs.canRedo());
        assertTrue(cs.canUndo());
       
        cs.put(new C());
        cs.put(new C());
        assertTrue(!cs.canRedo());
        assertTrue(cs.canUndo());

        cs.undo();
        assertTrue(cs.canRedo());
        assertTrue(cs.canUndo());
View Full Code Here

        cs.put(new C());
        assertTrue(!cs.canRedo());
        assertTrue(cs.canUndo());

        cs.undo();
        assertTrue(cs.canRedo());
        assertTrue(cs.canUndo());
        cs.undo();
        assertTrue(cs.canRedo());
        assertTrue(cs.canUndo());
        cs.undo();
View Full Code Here

        cs.undo();
        assertTrue(cs.canRedo());
        assertTrue(cs.canUndo());
        cs.undo();
        assertTrue(cs.canRedo());
        assertTrue(cs.canUndo());
        cs.undo();
        assertTrue(cs.canRedo());
        assertTrue(!cs.canUndo());
    }
View Full Code Here

        assertTrue(cs.canUndo());
        cs.undo();
        assertTrue(cs.canRedo());
        assertTrue(cs.canUndo());
        cs.undo();
        assertTrue(cs.canRedo());
        assertTrue(!cs.canUndo());
    }
   
    public void testLimit() throws Exception {
        CommandStack cs = new CommandStack();
View Full Code Here

        cs.put(new C(1));
        cs.put(new C(2));
        cs.put(new C(3));
        assertTrue(cs.undo().equals(new C(3)));
        assertTrue(cs.undo().equals(new C(2)));
        assertTrue(cs.canRedo());
        assertTrue(!cs.canUndo());
    }
   
    public void testPutUndoPut() throws Exception {
        CommandStack cs = new CommandStack();
View Full Code Here

        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

        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());
    }
   
    public class C implements Command {
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.