Examples of assertMessageLogged()


Examples of org.hibernate.validator.testutil.MessageLoggedAssertionLogger.assertMessageLogged()

    // No unwrapper exception shouldn't be thrown, type use constraints are ignored
    FooHolder fooHolder = new FooHolder();
    fooHolder.foo = null;
    validator.validate( fooHolder );

    assertingLogger.assertMessageLogged();
    log4jRootLogger.removeAppender( assertingLogger );
  }

  static class A1 {
    @Valid
View Full Code Here

Examples of org.hibernate.validator.testutil.MessageLoggedAssertionLogger.assertMessageLogged()

    Foo foo = new Foo();
    Set<ConstraintViolation<Foo>> constraintViolations = validator.validateProperty( foo, "bar" );
    assertNumberOfViolations( constraintViolations, 1 );
    assertCorrectConstraintViolationMessages( constraintViolations, "${validatedValue}" );

    assertingLogger.assertMessageLogged();
    log4jRootLogger.removeAppender( assertingLogger );
  }

  public static class Foo {
    @Size(max = 1, message = "{max}")
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.