Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

lviggiano opened this issue Feb 19, 2013 · 1 comment
Labels
bug

Comments

@lviggiano
Copy link
Owner

@lviggiano 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
Copy link
Owner Author

@lviggiano 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.