Package net.mindengine.galen.validation

Examples of net.mindengine.galen.validation.SectionValidation.check()


       
        SectionValidation sectionValidation = new SectionValidation(componentPageSpec.findSections(pageValidation.getSectionFilter()),
                new PageValidation(pageValidation.getBrowser(), objectContextPage, componentPageSpec, validationListener, pageValidation.getSectionFilter()),
                validationListener);
       
        List<ValidationError> errors = sectionValidation.check();
        if (errors != null && errors.size() > 0) {
            throw new ValidationErrorException("Child component spec contains " + errors.size() + " errors");
        }
    }
View Full Code Here


        List<PageSection> pageSections = pageSpec.findSections(asList("all"));
       
        assertThat("Filtered sections size should be", pageSections.size(), is(1));
       
        SectionValidation sectionValidation = new SectionValidation(pageSections, new PageValidation(null, page, pageSpec, validationListener, null), validationListener);
        List<ValidationError> errors = sectionValidation.check();
       
       
        assertThat("Invokations should", validationListener.getInvokations(), is("<o header>\n" +
                "<SpecContains header>\n" +
                "<SpecNear header>\n" +
View Full Code Here

        List<PageSection> pageSections = pageSpec.findSections(asList("mobile"));
       
        assertThat("Filtered sections size should be", pageSections.size(), is(2));
       
        SectionValidation sectionValidation = new SectionValidation(pageSections, new PageValidation(null, page, pageSpec, validationListener, null), validationListener);
        List<ValidationError> errors = sectionValidation.check();
       
        assertThat("Invokations should", validationListener.getInvokations(), is("<o header>\n" +
                "<SpecHeight header>\n" +
                "</o header>\n" +
                "<o menu-item-home>\n" +
View Full Code Here

        List<PageSection> pageSections = pageSpec.findSections(asList("screen-object-check"));
       
        assertThat("Filtered sections size should be", pageSections.size(), is(1));
       
        SectionValidation sectionValidation = new SectionValidation(pageSections, new PageValidation(null, page, pageSpec, validationListener, null), validationListener);
        List<ValidationError> errors = sectionValidation.check();
       
        assertThat("Invokations should", validationListener.getInvokations(), is("<o header>\n" +
                "<SpecWidth header>\n" +
                "</o header>\n"
                ));
View Full Code Here

        List<PageSection> pageSections = pageSpec.findSections(asList("viewport-object-check"));
       
        assertThat("Filtered sections size should be", pageSections.size(), is(1));
       
        SectionValidation sectionValidation = new SectionValidation(pageSections, new PageValidation(null, page, pageSpec, validationListener, null), validationListener);
        List<ValidationError> errors = sectionValidation.check();
       
        assertThat("Invokations should", validationListener.getInvokations(), is("<o feedback>\n" +
                "<SpecInside feedback>\n" +
                "</o feedback>\n"
                ));
View Full Code Here

        List<PageSection> pageSections = pageSpec.findSections(asList("multiple-objects-check"));
       
        assertThat("Filtered sections size should be", pageSections.size(), is(1));
       
        SectionValidation sectionValidation = new SectionValidation(pageSections, new PageValidation(null, page, pageSpec, validationListener, null), validationListener);
        List<ValidationError> errors = sectionValidation.check();
       
        assertThat("Invokations should contain", validationListener.getInvokations(), containsString(
                "<o menu-item-home>\n" +
                "<SpecHeight menu-item-home>\n" +
                "</o menu-item-home>\n"));
View Full Code Here

        List<PageSection> pageSections = pageSpec.findSections(asList("text-check"));
       
        assertThat("Filtered sections size should be", pageSections.size(), is(1));
       
        SectionValidation sectionValidation = new SectionValidation(pageSections, new PageValidation(null, page, pageSpec, validationListener, null), validationListener);
        List<ValidationError> errors = sectionValidation.check();
       
        assertThat("Invokations should", validationListener.getInvokations(), is(
                "<o menu-item-home>\n" +
                "<SpecText menu-item-home>\n" +
                "</o menu-item-home>\n" +
View Full Code Here

        List<PageSection> pageSections = pageSpec.findSections(asList("multi-check"));
       
        assertThat("Filtered sections size should be", pageSections.size(), is(1));
       
        SectionValidation sectionValidation = new SectionValidation(pageSections, new PageValidation(null, page, pageSpec, validationListener, null), validationListener);
        List<ValidationError> errors = sectionValidation.check();
       
        assertThat("Invokations should contain", validationListener.getInvokations(), containsString(
                "<o menu-items-1>\n" +
                "<SpecHeight menu-items-1>\n" +
                "</o menu-items-1>\n"));
View Full Code Here

        List<PageSection> pageSections = pageSpec.findSections(asList("mobile"));
       
        assertThat("Filtered sections size should be", pageSections.size(), is(2));
       
        SectionValidation sectionValidation = new SectionValidation(pageSections, new PageValidation(null, page, pageSpec, validationListener, null), validationListener);
        List<ValidationError> errors = sectionValidation.check();
       
        assertThat("Invokations should", validationListener.getInvokations(), is("<o header>\n" +
                "<SpecHeight header>\n" +
                "<e><msg>\"header\" height is 140px which is not in range of 150 to 185px</msg></e>\n" +
                "</o header>\n" +
View Full Code Here

        TestValidationListener validationListener = new TestValidationListener();
        List<PageSection> pageSections = pageSpec.getSections();
        assertThat("Filtered sections size should be", pageSections.size(), is(1));
       
        SectionValidation sectionValidation = new SectionValidation(pageSections, new PageValidation(null, page, pageSpec, validationListener, null), validationListener);
        List<ValidationError> errors = sectionValidation.check();
       
        assertLines(validationListener.getInvokations(), lines(
                "<o user-profile-1>",
                "<o user-pic>",
                "<SpecWidth user-pic>",
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.