Search in sources :

Example 1 with NotNullValidator

use of org.hibernate.validator.internal.constraintvalidators.bv.NotNullValidator in project hibernate-validator by hibernate.

the class NotNullValidatorTest method testIsValid.

@Test
public void testIsValid() {
    NotNullValidator constraint = new NotNullValidator();
    assertFalse(constraint.isValid(null, null));
    assertTrue(constraint.isValid(new Object(), null));
}
Also used : NotNullValidator(org.hibernate.validator.internal.constraintvalidators.bv.NotNullValidator) Test(org.testng.annotations.Test)

Aggregations

NotNullValidator (org.hibernate.validator.internal.constraintvalidators.bv.NotNullValidator)1 Test (org.testng.annotations.Test)1