Search in sources :

Example 1 with PropertiesFileParser

use of org.apache.tapestry5.services.messages.PropertiesFileParser in project tapestry-5 by apache.

the class PropertiesFileParserImplTest method read_utf.

@Test
public void read_utf() throws Exception {
    Resource utf8 = new ClasspathResource("org/apache/tapestry5/internal/services/messages/utf8.properties");
    PropertiesFileParser parser = getService(PropertiesFileParser.class);
    Map<String, String> properties = parser.parsePropertiesFile(utf8);
    assertEquals(properties.get("tapestry"), "\u30bf\u30da\u30b9\u30c8\u30ea\u30fc");
    assertEquals(properties.get("version"), "5");
}
Also used : ClasspathResource(org.apache.tapestry5.ioc.internal.util.ClasspathResource) Resource(org.apache.tapestry5.commons.Resource) ClasspathResource(org.apache.tapestry5.ioc.internal.util.ClasspathResource) PropertiesFileParser(org.apache.tapestry5.services.messages.PropertiesFileParser) Test(org.testng.annotations.Test)

Aggregations

Resource (org.apache.tapestry5.commons.Resource)1 ClasspathResource (org.apache.tapestry5.ioc.internal.util.ClasspathResource)1 PropertiesFileParser (org.apache.tapestry5.services.messages.PropertiesFileParser)1 Test (org.testng.annotations.Test)1