Package org.internna.iwebmvc.core.validation

Examples of org.internna.iwebmvc.core.validation.ValidationVisitor


    }

    @Test
    public void acceptField() throws Exception {
        Locale locale = entityManager.find(Locale.class, pk);
        ValidationVisitor visitor = new ValidationVisitor();
        Collection<ValidationError> errors = visitor.visit(locale);
        assertTrue("No errors for valid entities", errors.size() == 0);
        errors = visitor.visit(new Locale());
        assertTrue("Errors if missing properties", errors.size() == 2);
    }
View Full Code Here


        des.init();
        validator.decipherer = des;
        validator.validator = new AnnotatedValidator();
        Field f = AnnotatedValidator.class.getDeclaredField("validator");
        f.setAccessible(true);
        f.set(validator.validator, new ValidationVisitor());
        holder = new ContextHolder() {
            @Override
            public List<Locale> getAvailableLocales() {
                Locale l = new Locale();
                l.setDescription("English");
View Full Code Here

    private Errors errors;

    @Before
    public void setUp() throws Exception {
        annotatedValidator = new AnnotatedValidator();
        annotatedValidator.validator = new ValidationVisitor();
        collectionBean = new CollectionBean();
        collectionBean.setBeans(new ArrayList<InnerBean>());
        errors = new BeanPropertyBindingResult(collectionBean, "collectionBean");
    }
View Full Code Here

TOP

Related Classes of org.internna.iwebmvc.core.validation.ValidationVisitor

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.