Package org.jboss.as.test.integration.jpa.beanvalidation

Examples of org.jboss.as.test.integration.jpa.beanvalidation.SFSB1


     * Test that a bean validation error is not thrown
     * @throws Exception
     */
    @Test
    public void testSuccessfulBeanValidation() throws Exception {
        SFSB1 sfsb1 = lookup("SFSB1", SFSB1.class);
        sfsb1.createEmployee("name", "address", 1);
    }
View Full Code Here


     * Test that a bean validation error is thrown
     * @throws Exception
     */
    @Test
    public void testFailingBeanValidationNullAddress() throws Exception {
        SFSB1 sfsb1 = lookup("SFSB1", SFSB1.class);
        try {
            sfsb1.createEmployee("name", null, 2);
            fail("should of thrown validation error for null address in Employee entity");
        } catch (Throwable throwable) {
            ConstraintViolationException constraintViolationException = null;
            // find the ConstraintViolationException
            while(throwable != null && ! (throwable instanceof ConstraintViolationException)) {
View Full Code Here

TOP

Related Classes of org.jboss.as.test.integration.jpa.beanvalidation.SFSB1

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.