Package javax.validation.executable

Examples of javax.validation.executable.ExecutableValidator.validateConstructorReturnValue()


    Constructor<GreetingService> constructor = GreetingService.class.getConstructor();
    GreetingService createdObject = new GreetingService();

    ExecutableValidator executableValidator = getConfiguredExecutableValidator();

    Set<ConstraintViolation<GreetingService>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        createdObject
    );

    assertCorrectPropertyPaths( violations, "GreetingService.<return value>.hello" );
View Full Code Here


    Constructor<GreetingService> constructor = GreetingService.class.getConstructor( String.class );

    ExecutableValidator executableValidator = getConfiguredExecutableValidator();

    Set<ConstraintViolation<GreetingService>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        new GreetingService( "" )
    );

    assertCorrectConstraintViolationMessages( violations, "invalid" );
View Full Code Here

    Constructor<GreetingService> constructor = GreetingService.class.getConstructor( String.class );

    ExecutableValidator executableValidator = getConfiguredExecutableValidator();

    Set<ConstraintViolation<GreetingService>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        new GreetingService( "" )
    );

    assertCorrectConstraintViolationMessages( violations, "invalid 1", "invalid 2" );
View Full Code Here

    Constructor<GreetingService> constructor = GreetingService.class.getConstructor( CharSequence.class );

    ExecutableValidator executableValidator = getConfiguredExecutableValidator();

    Set<ConstraintViolation<GreetingService>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        new GreetingService( "" )
    );

    assertCorrectConstraintViolationMessages( violations, "invalid 1", "invalid 2" );
View Full Code Here

    Constructor<GreetingService> constructor = GreetingService.class.getConstructor( String.class, String.class );

    ExecutableValidator executableValidator = getConfiguredExecutableValidator();

    Set<ConstraintViolation<GreetingService>> violations = executableValidator.validateConstructorReturnValue(
        constructor,
        new GreetingService( "", "" )
    );

    assertCorrectConstraintViolationMessages( violations, "default message" );
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.