From: Simon Brandhof Date: Mon, 23 Jul 2012 22:39:38 +0000 (+0200) Subject: Missing test X-Git-Tag: 3.2~13^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=90f4577aa3e3b8b759ff58bfc09d6a546da17f8c;p=sonarqube.git Missing test --- 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 index 00000000000..6d966088d1d --- /dev/null +++ b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureDataTest.java @@ -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); + } +}