]> source.dussan.org Git - sonarqube.git/commitdiff
Remove coupling of test with machine locale
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 31 Mar 2015 07:36:08 +0000 (09:36 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 31 Mar 2015 07:36:08 +0000 (09:36 +0200)
sonar-application/src/test/java/org/sonar/application/PropsBuilderTest.java

index 82c0cd8c99d19ffc81262322ba0d8f49affc619a..4325a704747ed2e39b0d79d98328263682a62492 100644 (file)
@@ -19,6 +19,7 @@
  */
 package org.sonar.application;
 
+import org.apache.commons.io.Charsets;
 import org.apache.commons.io.FileUtils;
 import org.junit.Before;
 import org.junit.Rule;
@@ -126,7 +127,7 @@ public class PropsBuilderTest {
 
   @Test
   public void utf8_file_encoding() throws Exception {
-    FileUtils.write(new File(homeDir, "conf/sonar.properties"), "utf8prop=Thônes");
+    FileUtils.write(new File(homeDir, "conf/sonar.properties"), "utf8prop=Thônes", Charsets.UTF_8);
     Props props = new PropsBuilder(new Properties(), jdbcSettings, homeDir).build();
     assertThat(props.value("utf8prop")).isEqualTo("Thônes");
   }