]> source.dussan.org Git - sonarqube.git/commitdiff
Missing test
authorSimon Brandhof <simon.brandhof@gmail.com>
Mon, 23 Jul 2012 22:39:38 +0000 (00:39 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Mon, 23 Jul 2012 22:39:38 +0000 (00:39 +0200)
sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureDataTest.java [new file with mode: 0644]

diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureDataTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureDataTest.java
new file mode 100644 (file)
index 0000000..6d96608
--- /dev/null
@@ -0,0 +1,18 @@
+package org.sonar.api.database.model;
+
+import com.google.common.base.Charsets;
+import org.junit.Test;
+
+import static org.fest.assertions.Assertions.assertThat;
+
+public class MeasureDataTest {
+  @Test
+  public void text_is_utf8() {
+    System.out.println(Charsets.UTF_8.name());
+    MeasureData data = new MeasureData();
+    String s = "accents éà and special characters ç€";
+    data.setData(s.getBytes(Charsets.UTF_8));
+
+    assertThat(data.getText()).isEqualTo(s);
+  }
+}