use of org.hibernate.validator.internal.engine.MessageInterpolatorContext in project hibernate-validator by hibernate.
the class ResourceBundleMessageInterpolatorTest method testUnSuccessfulInterpolation.
@Test
public void testUnSuccessfulInterpolation() {
interpolator = new ResourceBundleMessageInterpolator(new TestResourceBundleLocator());
MessageInterpolatorContext messageInterpolatorContext = createMessageInterpolatorContext(notNullDescriptor);
// missing {}
String expected = "foo";
String actual = interpolator.interpolate("foo", messageInterpolatorContext);
assertEquals(actual, expected, "Wrong substitution");
expected = "#{foo {}";
actual = interpolator.interpolate("#{foo {}", messageInterpolatorContext);
assertEquals(actual, expected, "Wrong substitution");
}
Aggregations