Package org.hibernate.beanvalidation.tck.tests.methodvalidation.model

Examples of org.hibernate.beanvalidation.tck.tests.methodvalidation.model.Item


        methodName,
        String.class,
        Item.class,
        short.class
    );
    Object[] parameterValues = new Object[] { null, new Item( "" ), (short) 0 };

    Set<ConstraintViolation<Object>> violations = executableValidator.validateParameters(
        object,
        method,
        parameterValues,
View Full Code Here


        methodName,
        String.class,
        Item.class,
        byte.class
    );
    Object[] parameterValues = new Object[] { null, new Item( "" ), (byte) 0 };

    Set<ConstraintViolation<Object>> violations = executableValidator.validateParameters(
        object,
        method,
        parameterValues,
        OrderServiceSequence.class
    );

    //Only the constraints of the Basic group should fail
    assertCorrectConstraintTypes( violations, Size.class, NotNull.class );
    assertCorrectPathNodeNames(
        violations,
        names( methodName, "arg0" ),
        names( methodName, "arg1", "name" )
    );
    assertCorrectPathNodeKinds(
        violations,
        kinds( ElementKind.METHOD, ElementKind.PARAMETER ),
        kinds( ElementKind.METHOD, ElementKind.PARAMETER, ElementKind.PROPERTY )
    );

    parameterValues = new Object[] { "Bob", new Item( "BV Specification" ), (byte) 0 };

    violations = executableValidator.validateParameters(
        object,
        method,
        parameterValues,
View Full Code Here

        methodName,
        String.class,
        Item.class,
        byte.class
    );
    Object[] parameterValues = new Object[] { null, new Item( "" ), (byte) 0 };

    Set<ConstraintViolation<Object>> violations = executableValidator.validateParameters(
        object,
        method,
        parameterValues
    );

    //Only the constraints of the Basic group on OrderServiceWithRedefinedDefaultGroupSequence and of
    //the Default group on Item should fail
    assertCorrectConstraintTypes( violations, Size.class, NotNull.class );
    assertCorrectPathNodeNames(
        violations,
        names( methodName, "arg0" ),
        names( methodName, "arg1", "name" )
    );
    assertCorrectPathNodeKinds(
        violations,
        kinds( ElementKind.METHOD, ElementKind.PARAMETER ),
        kinds( ElementKind.METHOD, ElementKind.PARAMETER, ElementKind.PROPERTY )
    );

    parameterValues = new Object[] { "Bob", new Item( "" ), (byte) 0 };

    violations = executableValidator.validateParameters(
        object,
        method,
        parameterValues
View Full Code Here

    Constructor<OrderService> constructor = OrderService.class.getConstructor(
        String.class,
        Item.class,
        int.class
    );
    Object[] parameterValues = new Object[] { null, new Item( "" ), 0 };

    Set<ConstraintViolation<OrderService>> violations = executableValidator.validateConstructorParameters(
        constructor,
        parameterValues
    );
View Full Code Here

    Constructor<ExtendedOrderService> constructor = ExtendedOrderService.class.getConstructor(
        String.class,
        Item.class,
        int.class
    );
    Object[] parameterValues = new Object[] { null, new Item( "" ), 0 };

    Set<ConstraintViolation<ExtendedOrderService>> violations = executableValidator.validateConstructorParameters(
        constructor,
        parameterValues
    );
View Full Code Here

    Constructor<OrderService> constructor = OrderService.class.getConstructor(
        String.class,
        Item.class,
        Integer.class
    );
    Object[] parameterValues = new Object[] { null, new Item( "" ), 0 };

    Set<ConstraintViolation<OrderService>> violations = executableValidator.validateConstructorParameters(
        constructor,
        parameterValues,
        Basic.class
View Full Code Here

    Constructor<OrderService> constructor = OrderService.class.getConstructor(
        String.class,
        Item.class,
        long.class
    );
    Object[] parameterValues = new Object[] { null, new Item( "" ), 0 };

    Set<ConstraintViolation<OrderService>> violations = executableValidator.validateConstructorParameters(
        constructor,
        parameterValues,
        Basic.class
View Full Code Here

    Constructor<OrderService> constructor = OrderService.class.getConstructor(
        String.class,
        Item.class,
        short.class
    );
    Object[] parameterValues = new Object[] { null, new Item( "" ), (short) 0 };

    Set<ConstraintViolation<OrderService>> violations = executableValidator.validateConstructorParameters(
        constructor,
        parameterValues,
        Basic.class, Default.class
View Full Code Here

    Constructor<OrderService> constructor = OrderService.class.getConstructor(
        String.class,
        Item.class,
        byte.class
    );
    Object[] parameterValues = new Object[] { null, new Item( "" ), (byte) 0 };

    Set<ConstraintViolation<OrderService>> violations = executableValidator.validateConstructorParameters(
        constructor,
        parameterValues,
        OrderServiceSequence.class
    );

    //Only the constraints of the Basic group should fail
    assertCorrectConstraintTypes( violations, Size.class, NotNull.class );
    assertCorrectPathNodeNames(
        violations,
        names( className, "arg0" ),
        names( className, "arg1", "name" )
    );
    assertCorrectPathNodeKinds(
        violations,
        kinds( ElementKind.CONSTRUCTOR, ElementKind.PARAMETER ),
        kinds( ElementKind.CONSTRUCTOR, ElementKind.PARAMETER, ElementKind.PROPERTY )
    );

    parameterValues = new Object[] { "Bob", new Item( "BV Specification" ), (byte) 0 };

    violations = executableValidator.validateConstructorParameters(
        constructor,
        parameterValues,
        OrderServiceSequence.class
View Full Code Here

        .getConstructor(
            String.class,
            Item.class,
            byte.class
        );
    Object[] parameterValues = new Object[] { null, new Item( "" ), (byte) 0 };

    Set<ConstraintViolation<OrderServiceWithRedefinedDefaultGroupSequence>> violations = executableValidator
        .validateConstructorParameters(
            constructor,
            parameterValues
        );

    //Only the constraints of the Basic group on OrderServiceWithRedefinedDefaultGroupSequence and of
    //the Default group on Item should fail
    assertCorrectConstraintTypes( violations, Size.class, NotNull.class );
    assertCorrectPathNodeNames(
        violations,
        names( className, "arg0" ),
        names( className, "arg1", "name" )
    );
    assertCorrectPathNodeKinds(
        violations,
        kinds( ElementKind.CONSTRUCTOR, ElementKind.PARAMETER ),
        kinds( ElementKind.CONSTRUCTOR, ElementKind.PARAMETER, ElementKind.PROPERTY )
    );

    parameterValues = new Object[] { "Bob", new Item( "" ), (byte) 0 };

    violations = executableValidator.validateConstructorParameters(
        constructor,
        parameterValues
    );
View Full Code Here

TOP

Related Classes of org.hibernate.beanvalidation.tck.tests.methodvalidation.model.Item

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.