Package net.mindengine.galen.specs.page

Examples of net.mindengine.galen.specs.page.CorrectionsRect$Correction


    private CorrectionsRect processCorrection(String numbersText) {
        if (!numbersText.isEmpty()) {
            String values[] = numbersText.split(",");
            if (values.length == 4) {
                return new CorrectionsRect(readCorrection(values[0]), readCorrection(values[1]), readCorrection(values[2]), readCorrection(values[3]));
            }
            else throw new SyntaxException(UNKNOWN_LINE, "Wrong number of arguments in corrections: " + values.length);
        }
        else throw new SyntaxException(UNKNOWN_LINE, "Error parsing corrections. No values provided");
    }
View Full Code Here


            row("my-object-123  @  (0,0,-1,-1)  css   #qwe", "my-object-123", new Locator("css", "#qwe").withCorrections(simpleCorrectionRect(0, 0, -1, -1))),
            row("my-object-123  @(10, 20, +5, +30)  css   #qwe", "my-object-123", new Locator("css", "#qwe").withCorrections(simpleCorrectionRect(10, 20, 5, 30))),
            row("my-object-123  @ ( 0 , 0 , 4, -5 )  css   #qwe", "my-object-123", new Locator("css", "#qwe").withCorrections(simpleCorrectionRect(0, 0, 4, -5))),
            row("my-object-123  @ ( 0 , 0 , =40, =30 )  css   #qwe", "my-object-123",
                    new Locator("css", "#qwe").withCorrections(
                            new CorrectionsRect(new CorrectionsRect.Correction(0, CorrectionsRect.Type.PLUS),
                                    new CorrectionsRect.Correction(0, CorrectionsRect.Type.PLUS),
                                    new CorrectionsRect.Correction(40, CorrectionsRect.Type.EQUALS),
                                    new CorrectionsRect.Correction(30, CorrectionsRect.Type.EQUALS)))),
        };
    }
View Full Code Here

        String objectName = expectWord(reader, "Object name is not defined correctly");
       
        try {
            String word = expectCorrectionsOrId(reader, objectName);
            String locatorType;
            CorrectionsRect corrections = null;
            if (word.equals(CORRECTIONS_SYMBOL)) {
                corrections = Expectations.corrections().read(reader);
               
                locatorType = expectWord(reader, format("Missing locator for object \"%s\"", objectName));
            }
View Full Code Here

TOP

Related Classes of net.mindengine.galen.specs.page.CorrectionsRect$Correction

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.