Package org.loadui.testfx.service.query

Examples of org.loadui.testfx.service.query.PointQuery


    //---------------------------------------------------------------------------------------------

    @Test
    public void pointFor_Bounds_atOffset() {
        // given:
        PointQuery pointQuery = pointLocator.pointFor(new BoundingBox(100, 100, 50, 50));

        // when:
        Point2D point = pointQuery.atOffset(0, 0).query();

        // then:
        assertThat(point, Matchers.equalTo(new Point2D(100, 100)));
    }
View Full Code Here


    @Test
    public void pointFor_Point2D_atOffset() {
        // given:
        boundsLocatorStub.bounds = nodeBounds;
        PointQuery pointQuery = pointLocator.pointFor(new Point2D(100, 100));

        // when:
        Point2D point = pointQuery.atOffset(0, 0).query();

        // then:
        assertThat(point, Matchers.equalTo(new Point2D(100, 100)));
    }
View Full Code Here

    @Test
    public void pointFor_Node_atOffset() {
        // given:
        boundsLocatorStub.bounds = nodeBounds;
        PointQuery pointQuery = pointLocator.pointFor((Node) null);

        // when:
        Point2D point = pointQuery.atOffset(0, 0).query();

        // then:
        assertThat(point, Matchers.equalTo(topLeftPointFrom(nodeBounds)));
    }
View Full Code Here

    @Test
    public void pointFor_Node_atOffset_afterChange() {
        // given:
        boundsLocatorStub.bounds = nodeBounds;
        PointQuery pointQuery = pointLocator.pointFor((Node) null);

        // when:
        boundsLocatorStub.bounds = nodeBoundsAfterChange;
        Point2D point = pointQuery.atOffset(0, 0).query();

        // then:
        assertThat(point, Matchers.equalTo(topLeftPointFrom(nodeBoundsAfterChange)));
    }
View Full Code Here

    @Test
    public void pointFor_Scene_atOffset() {
        // given:
        boundsLocatorStub.bounds = sceneBounds;
        PointQuery pointQuery = pointLocator.pointFor((Scene) null);

        // when:
        Point2D point = pointQuery.atOffset(0, 0).query();

        // then:
        assertThat(point, Matchers.equalTo(topLeftPointFrom(sceneBounds)));
    }
View Full Code Here

    @Test
    public void pointFor_Scene_atOffset_afterChange() {
        // given:
        boundsLocatorStub.bounds = sceneBounds;
        PointQuery pointQuery = pointLocator.pointFor((Scene) null);

        // when:
        boundsLocatorStub.bounds = sceneBoundsAfterChange;
        Point2D point = pointQuery.atOffset(0, 0).query();

        // then:
        assertThat(point, Matchers.equalTo(topLeftPointFrom(sceneBoundsAfterChange)));
    }
View Full Code Here

    @Test
    public void pointFor_Window_atOffset() {
        // given:
        boundsLocatorStub.bounds = windowBounds;
        PointQuery pointQuery = pointLocator.pointFor((Window) null);

        // when:
        Point2D point = pointQuery.atOffset(0, 0).query();

        // then:
        assertThat(point, Matchers.equalTo(topLeftPointFrom(windowBounds)));
    }
View Full Code Here

    @Test
    public void pointFor_Window_atOffset_afterChange() {
        // given:
        boundsLocatorStub.bounds = windowBounds;
        PointQuery pointQuery = pointLocator.pointFor((Window) null);

        // when:
        boundsLocatorStub.bounds = windowBoundsAfterChange;
        Point2D point = pointQuery.atOffset(0, 0).query();

        // then:
        assertThat(point, Matchers.equalTo(topLeftPointFrom(windowBoundsAfterChange)));
    }
View Full Code Here

    //---------------------------------------------------------------------------------------------

    @Override
    public Point2D query() {
        Bounds bounds = fetchCallableBounds();
        PointQuery boundsQuery = new BoundsPointQuery(bounds)
            .atPosition(getPosition())
            .atOffset(getOffset());
        return boundsQuery.query();
    }
View Full Code Here

    }

    @Test
    public void drag_with_pointQuery_and_primary_button() {
        // given:
        PointQuery pointQuery = mock(PointQuery.class);

        // when:
        dragRobot.drag(pointQuery, MouseButton.PRIMARY);

        // then:
View Full Code Here

TOP

Related Classes of org.loadui.testfx.service.query.PointQuery

Copyright © 2018 www.massapicom. 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.