use of org.apache.wicket.request.resource.JavaScriptPackageResource in project wicket by apache.
the class PackageResourceTest method javascriptFileWithEncoding.
@Test
public void javascriptFileWithEncoding() {
final String encoding = "Klingon-8859-42";
final JavaScriptPackageResource resource = new JavaScriptPackageResource(PackageResourceTest.class, "packaged3.js", null, null, null) {
private static final long serialVersionUID = 1L;
};
resource.setTextEncoding(encoding);
tester.startResource(resource);
final String contentType = tester.getLastResponse().getContentType();
assertEquals("text/javascript; charset=" + encoding, contentType);
}
Aggregations