use of org.jetbrains.jps.model.JpsEncodingConfigurationService in project intellij-community by JetBrains.
the class JpsProjectSerializationTest method testLoadEncoding.
public void testLoadEncoding() {
loadProject(SAMPLE_PROJECT_PATH);
JpsEncodingConfigurationService service = JpsEncodingConfigurationService.getInstance();
assertEquals("UTF-8", service.getProjectEncoding(myModel));
JpsEncodingProjectConfiguration configuration = service.getEncodingConfiguration(myProject);
assertNotNull(configuration);
assertEquals("UTF-8", configuration.getProjectEncoding());
assertEquals("windows-1251", configuration.getEncoding(new File(getAbsolutePath("util"))));
assertEquals("windows-1251", configuration.getEncoding(new File(getAbsolutePath("util/foo/bar/file.txt"))));
assertEquals("UTF-8", configuration.getEncoding(new File(getAbsolutePath("other"))));
}
Aggregations