Package abbot.tester

Examples of abbot.tester.JComponentTester.click()


    DimensionLine firstDimensionLine = orderedDimensionLines.get(0);
    assertEqualsDimensionLine(520, 122, 520, 298, 0, firstDimensionLine);
    assertEqualsDimensionLine(42, 310, 498, 310, 20, orderedDimensionLines.get(1));
   
    // 16. Select the first dimension line
    tester.click(frame.selectButton);
    tester.actionClick(planComponent, 280, 90);
    assertEquals("Wrong selection", 1, frame.home.getSelectedItems().size());
    assertEquals("Selection doesn't contain the first dimension",
        frame.home.getSelectedItems().get(0), firstDimensionLine);
    // Move its end point to (330, 167)
View Full Code Here


      }
    });
   
    // 2. Use WALL_CREATION mode
    JComponentTester tester = new JComponentTester();
    tester.click(frame.modeButton);
    assertEquals("Current mode isn't " + PlanController.Mode.WALL_CREATION,
        PlanController.Mode.WALL_CREATION, frame.planController.getMode());
    // Click at (30, 30), (270, 31), (269, 170), then double click at (30, 171)
    tester.actionClick(planComponent, 30, 30);
    tester.actionClick(planComponent, 270, 31);
View Full Code Here

    assertCoordinatesEqualWallPoints(20, 300, 60, 60, wall4);
    assertSelectionContains(frame.home, wall4);
    assertWallsAreJoined(wall3, wall4, null);
   
    // 4. Use SELECTION mode
    tester.click(frame.modeButton);
    // Check current mode is SELECTION
    assertEquals("Current mode isn't " + PlanController.Mode.SELECTION,
        PlanController.Mode.SELECTION, frame.planController.getMode());
    // Give focus to plan component
    tester.actionFocus(planComponent);
View Full Code Here

    tester.actionKeyStroke(KeyEvent.VK_DELETE);
    // Check plan contains only the first three walls
    assertHomeContains(frame.home, wall1, wall2, wall3);
   
    // 5. Use WALL_CREATION mode
    tester.click(frame.modeButton);  
    //  Click at (31, 29), then double click at (30, 170)
    tester.actionClick(planComponent, 31, 29);
    tester.actionClick(planComponent, 30, 170, InputEvent.BUTTON1_MASK, 2);
    // Check a new forth wall was created at (20, 20), (20, 300) coordinates
    wall4 = orderedWalls.get(orderedWalls.size() - 1);
View Full Code Here

    assertCoordinatesEqualWallPoints(20, 20, 20, 300, wall4);
    // Check its end points are joined to the first and third wall
    assertWallsAreJoined(wall1, wall4, wall3);
   
    // 6. Use SELECTION mode
    tester.click(frame.modeButton);
    // Drag and drop cursor from (200, 100) to (300, 180)
    tester.actionMousePress(planComponent,
        new ComponentLocation(new Point(200, 100)));
    tester.actionMouseMove(planComponent,
        new ComponentLocation(new Point(300, 180)));
View Full Code Here

   
    // 14. Select first wall
    tester.actionClick(planComponent, 60, 50);
    assertSelectionContains(frame.home, wall1);
    // Split first wall in two walls
    tester.click(frame.splitButton);
    Wall wall5 = orderedWalls.get(orderedWalls.size() - 2);
    Wall wall6 = orderedWalls.get(orderedWalls.size() - 1);
    assertSelectionContains(frame.home, wall5);
    assertCoordinatesEqualWallPoints(60, 60, 282, 40, wall5);
    assertCoordinatesEqualWallPoints(282, 40, 504, 20, wall6);
View Full Code Here

    assertCoordinatesEqualWallPoints(282, 40, 504, 20, wall6);
    assertWallsAreJoined(wall4, wall5, wall6);
    assertWallsAreJoined(wall5, wall6, wall2);
    assertFalse("Split wall still present in home", frame.home.getWalls().contains(wall1));
    // Undo operation and check undone state
    tester.click(frame.undoButton);
    assertSelectionContains(frame.home, wall1);
    assertCoordinatesEqualWallPoints(60, 60, 504, 20, wall1);
    assertWallsAreJoined(wall4, wall1, wall2);
    assertTrue("Split wall not present in home", frame.home.getWalls().contains(wall1));
    assertFalse("Wall still present in home", frame.home.getWalls().contains(wall5));
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.