Substitution and format not working as expected when used together #17

Closed
lviggiano opened this Issue Feb 19, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@lviggiano
Owner

lviggiano commented Feb 19, 2013

This test is failing in version 1.0.3

public static interface SubstituteAndFormat extends Config {
    @DefaultValue("Hello ${mister}")
    String salutation(String name);

    @DefaultValue("Mr. %s")
    String mister(String name);
}

@Test
public void testSubstitutionAndFormat() {
    SubstituteAndFormat cfg = ConfigFactory.create(SubstituteAndFormat.class);
    assertEquals("Hello Mr. Luigi", cfg.salutation("Luigi")); // this fails returning "Hello Mr. %s"
    assertEquals("Mr. Luigi", cfg.mister("Luigi"));
}
@lviggiano

This comment has been minimized.

Show comment
Hide comment
@lviggiano

lviggiano Feb 19, 2013

Owner

fixed in commit baaa4e2

Owner

lviggiano commented Feb 19, 2013

fixed in commit baaa4e2

@lviggiano lviggiano closed this Feb 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment