Examples of LcduiTestCanvas


Examples of com.sun.midp.util.LcduiTestCanvas

     * being tested)
     */
    protected void testOne() {
        declare(testName + " 1: STOP command added to the screen.");
       
        LcduiTestCanvas canvas = new LcduiTestCanvas();

        Command stopCmd = new Command("Stop", Command.STOP, 0);
        canvas.addCommand(stopCmd);
   
        checkLeftBtn(canvas, stopCmd);
    }
View Full Code Here

Examples of com.sun.midp.util.LcduiTestCanvas

     * commands are being tested)
     */
    protected void testTwo() {
        declare(testName + " 2: CANCEL & STOP commands added to the screen.");
       
        LcduiTestCanvas canvas = new LcduiTestCanvas();

        Command cancelCmd = new Command("Cancel", Command.CANCEL, 0);
        Command stopCmd = new Command("Stop", Command.STOP, 0);
       
        // we add the commands in reverse order so that we are
        // sure the button layer is sorting it correctly
        canvas.addCommand(stopCmd);
        canvas.addCommand(cancelCmd);
   
        checkLeftBtn(canvas, cancelCmd);
    }
View Full Code Here

Examples of com.sun.midp.util.LcduiTestCanvas

     * commands are being tested)
     */
    protected void testThree() {
        declare(testName+" 3: EXIT, CANCEL & STOP commands added to the screen.");
       
        LcduiTestCanvas canvas = new LcduiTestCanvas();

        Command exitCmd = new Command("Exit", Command.EXIT, 0);
        Command cancelCmd = new Command("Cancel", Command.CANCEL, 0);
        Command stopCmd = new Command("Stop", Command.STOP, 0);
   
        // we add the commands in reverse order so that we are
        // sure the button layer is sorting it correctly
        canvas.addCommand(stopCmd);
        canvas.addCommand(cancelCmd);
        canvas.addCommand(exitCmd);
       
        checkLeftBtn(canvas, exitCmd);
    }
View Full Code Here

Examples of com.sun.midp.util.LcduiTestCanvas

     * (only negative commands are being tested)
     */
    protected void testFour() {
        declare(testName+" 4: BACK, EXIT, CANCEL & STOP commands added to the screen.");
       
        LcduiTestCanvas canvas = new LcduiTestCanvas();

        Command backCmd = new Command("Back", Command.BACK, 0);
        Command exitCmd = new Command("Exit", Command.EXIT, 0);
        Command cancelCmd = new Command("Cancel", Command.CANCEL, 0);
        Command stopCmd = new Command("Stop", Command.STOP, 0);
       
        // we add the commands in reverse order so that we are
        // sure the button layer is sorting it correctly
        canvas.addCommand(stopCmd);
        canvas.addCommand(cancelCmd);
        canvas.addCommand(exitCmd);
        canvas.addCommand(backCmd);
        checkLeftBtn(canvas, backCmd);
    }
View Full Code Here

Examples of com.sun.midp.util.LcduiTestCanvas

     * being tested)
     */
    protected void testFive() {
        declare(testName + " 5: BACK, STOP, CANCEL, EXIT, HELP, OK, SCREEN & ITEM commands added to the screen.");
       
        LcduiTestCanvas canvas = new LcduiTestCanvas();
 
        // we add the commands in reverse order so that we are
        // sure the button layer is sorting it correctly
        for (int i = 0; i < 2; i++) {
            canvas.addCommand(new Command("STOP" + i, Command.STOP, i));
            canvas.addCommand(new Command("CANCEL" + i, Command.CANCEL, i));
            canvas.addCommand(new Command("EXIT" + i, Command.EXIT, i));
            canvas.addCommand(new Command("HELP" + i, Command.HELP, i));
            canvas.addCommand(new Command("OK" + i, Command.OK, i));
            canvas.addCommand(new Command("SCREEN" + i, Command.SCREEN, i));
            canvas.addCommand(new Command("ITEM" + i, Command.ITEM, i));
        }
   
        Command backCmd = new Command("Back", Command.BACK, 0);
        canvas.addCommand(backCmd);
   
        checkLeftBtn(canvas, backCmd);
        Command[] cmds = window.getSoftTwo();
       
        assertTrue("ITEM", cmds[0].getCommandType() == Command.ITEM);
View Full Code Here

Examples of com.sun.midp.util.LcduiTestCanvas

     * being tested)
     */
    protected void testSix() {
        declare(testName + " 6: HELP, OK, SCREEN & ITEM commands added to the screen.");
       
        LcduiTestCanvas canvas = new LcduiTestCanvas();
 
  Command helpCmd   = new Command("HELP",   Command.HELP,   0);
  Command okCmd     = new Command("OK",     Command.OK,     1);
  Command screenCmd = new Command("SCREEN", Command.SCREEN, 2);
  Command itemCmd   = new Command("ITEM",   Command.ITEM,   3);

  canvas.addCommand(helpCmd);
  canvas.addCommand(okCmd);
  canvas.addCommand(screenCmd);
  canvas.addCommand(itemCmd);

        checkLeftBtn(canvas, itemCmd); // ITEM command has highest priority
    }
View Full Code Here

Examples of com.sun.midp.util.LcduiTestCanvas

    /**
     * Case: N.
     */
    void testN() {
        LcduiTestCanvas cv1 = new LcduiTestCanvas();
        setCurrentWait(cv1);
        checkCurrent("cv1", cv1, true);
    }
View Full Code Here

Examples of com.sun.midp.util.LcduiTestCanvas

    /**
     * Case: A.
     */
    void testA() {
        LcduiTestCanvas cv0 = new LcduiTestCanvas();
        Alert alert = makeAlert("alert");

        // establish initial conditions
        setCurrentWait(cv0);
        checkCurrent("cv0", cv0, true);
View Full Code Here

Examples of com.sun.midp.util.LcduiTestCanvas

    /**
     * Case: 2.
     */
    void test2() {
        LcduiTestCanvas cv0 = new LcduiTestCanvas();
        LcduiTestCanvas cv1 = new LcduiTestCanvas();
        Alert alert = makeAlert("alert");

        // establish initial conditions
        setCurrentWait(cv0);
        checkCurrent("cv0", cv0, true);
View Full Code Here

Examples of com.sun.midp.util.LcduiTestCanvas

    /**
     * Case: NN.
     */
    void testNN() {
        final LcduiTestCanvas cv1 = new LcduiTestCanvas();
        final LcduiTestCanvas cv2 = new LcduiTestCanvas();

        // Use callSerially to make sure both setCurrent() calls
        // occur before the first screen-change event is processed.

        dpy.callSerially(
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.