Package net.sourceforge.annovalidator.builtin.validators.ValidateDateCompare

Examples of net.sourceforge.annovalidator.builtin.validators.ValidateDateCompare.DateComparisonValidator


    public void testDateCompareForComparisonTypesPass()
            throws ReportedValidationException {
        TestObjectForComparisonTypes testObject =
            new TestObjectForComparisonTypes(
                    "02/11/2008", "31/10/2008","01/11/2008");
        DateComparisonValidator validator = new DateComparisonValidator();
       
        for (Field field
                : TestObjectForComparisonTypes.class.getDeclaredFields()) {
            ValidateDateCompare annotation =
                (ValidateDateCompare) ReflectionUtil.getAnnotation(
                        field, ValidateDateCompare.class);
            if (annotation != null) {
                assertTrue(validator.validate(
                        (DateSource) ReflectionUtil.
                            determineAnnotationParameterValue(
                                    annotation, "firstDate"),
                        (DateSource) ReflectionUtil.
                            determineAnnotationParameterValue(
View Full Code Here

TOP

Related Classes of net.sourceforge.annovalidator.builtin.validators.ValidateDateCompare.DateComparisonValidator

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.