@@ -0,0 +1,1896 @@
+package org.hibernate.validator.test.engine.failfast;%0A%0Aimport java.util.Set;%0Aimport javax.validation.ConstraintViolation;%0Aimport javax.validation.Validator;%0Aimport javax.validation.ValidatorFactory;%0Aimport javax.validation.constraints.NotNull;%0A%0Aimport org.testng.annotations.Test;%0A%0Aimport org.hibernate.validator.HibernateValidator;%0Aimport org.hibernate.validator.HibernateValidatorConfiguration;%0Aimport org.hibernate.validator.HibernateValidatorFactory;%0Aimport org.hibernate.validator.constraints.Email;%0Aimport org.hibernate.validator.test.util.TestUtil;%0A%0Aimport static org.hibernate.validator.test.util.TestUtil.assertNumberOfViolations;%0A%0A/**%0A * @author Emmanuel Bernard%0A * @author Kevin Pollet - SERLI - kevin.pollet@serli.com%0A */%0Apublic class FailFastTest %7B%0A%09@Test%0A%09public void testFailFastSetOnValidatorFactory() %7B%0A%09%09final HibernateValidatorConfiguration configuration = TestUtil.getConfiguration( HibernateValidator.class );%0A%09%09final ValidatorFactory factory = configuration.failFast( true ).buildValidatorFactory();%0A%0A%09%09final Validator validator = factory.getValidator();%0A%09%09A testInstance = new A();%0A%0A%09%09Set%3CConstraintViolation%3CA%3E%3E constraintViolations = validator.validate( testInstance );%0A%09%09assertNumberOfViolations( constraintViolations, 1 );%0A%09%7D%0A%0A%09@Test%0A%09public void testFailFastSetOnValidator() %7B%0A%09%09final HibernateValidatorConfiguration configuration = TestUtil.getConfiguration( HibernateValidator.class );%0A%09%09final ValidatorFactory factory = configuration.buildValidatorFactory();%0A%0A%09%09final Validator validator =%0A%09%09%09%09factory.unwrap(HibernateValidatorFactory.class)%0A%09%09%09%09%09.usingHibernateContext()%0A%09%09%09%09%09%09.failFast( true )%0A%09%09%09%09%09.getValidator();%0A%09%09A testInstance = new A();%0A%0A%09%09Set%3CConstraintViolation%3CA%3E%3E constraintViolations = validator.validate( testInstance );%0A%09%09assertNumberOfViolations( constraintViolations, 1 );%0A%09%7D%0A%0A%09class A %7B%0A%09%09@NotNull%0A%09%09String b;%0A%0A%09%09@NotNull @Email%0A%09%09String c;%0A%09%7D%0A%7D%0A

Add fail fast unit tests.