Author: hardy.ferentschik
Date: 2009-08-17 10:28:29 -0400 (Mon, 17 Aug 2009)
New Revision: 17334
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/defaultprovider/BootstrapTest.java
Log:
HV-202
Updated test to really use a Configuration object to set the MessageInterpolator
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/defaultprovider/BootstrapTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/defaultprovider/BootstrapTest.java 2009-08-17
13:43:03 UTC (rev 17333)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/defaultprovider/BootstrapTest.java 2009-08-17
14:28:29 UTC (rev 17334)
@@ -27,6 +27,7 @@
import java.util.List;
import java.util.Locale;
import java.util.Set;
+import javax.validation.Configuration;
import javax.validation.ConstraintViolation;
import javax.validation.MessageInterpolator;
import javax.validation.Validation;
@@ -71,10 +72,9 @@
@Test
@SpecAssertion(section = "4.3.2", id = "b")
public void testCustomMessageInterpolatorViaConfiguration() {
- ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
- Validator validator = factory.usingContext()
- .messageInterpolator( new DummyMessageInterpolator() )
- .getValidator();
+ Configuration config = Validation.byDefaultProvider().configure();
+ config = config.messageInterpolator( new DummyMessageInterpolator() );
+ Validator validator = config.buildValidatorFactory().getValidator();
assertCustomMessageInterpolatorUsed( validator );
}
Show replies by date