Skip to content

Commit

Permalink
BVTCK-42 Adding test for handling of "\$"
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarmorling committed Feb 26, 2013
1 parent a8916b0 commit cdf042c
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -129,10 +129,10 @@ public void testMessagesCanBeOverriddenAtConstraintLevel() {
@SpecAssertions({
@SpecAssertion(section = "5.3.1", id = "f"),
@SpecAssertion(section = "5.3.1", id = "g"),
@SpecAssertion(section = "5.3.1", id = "h")
@SpecAssertion(section = "5.3.1", id = "h"),
@SpecAssertion(section = "5.3.1", id = "i")
})
public void testLiteralCurlyBraces() {

public void testEscapedCharactersAreConsideredAsLiterals() {
MessageInterpolator interpolator = getDefaultMessageInterpolator();
ConstraintDescriptor<?> descriptor = getDescriptorFor( DummyEntity.class, "foo" );
MessageInterpolator.Context context = new TestContext( descriptor );
Expand All @@ -148,6 +148,10 @@ public void testLiteralCurlyBraces() {
expected = "\\";
actual = interpolator.interpolate( "\\", context );
assertEquals( actual, expected, "Wrong substitution" );

expected = "$";
actual = interpolator.interpolate( "\\$", context );
assertEquals( actual, expected, "Wrong substitution" );
}

@Test
Expand Down

0 comments on commit cdf042c

Please sign in to comment.