]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 6 Feb 2014 10:17:20 +0000 (11:17 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 6 Feb 2014 10:17:32 +0000 (11:17 +0100)
sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java
sonar-server/src/main/java/org/sonar/server/rule/RuleDocumentParser.java

index 10dba57cd7fc98cd05e56280ce93540000ebbed0..408ced20c9d089d105c647df053bece5e4d3788c 100644 (file)
@@ -61,21 +61,15 @@ public class IssueChangeDtoTest {
   }
 
   @Test
-  public void create_from_diff_without_date() throws Exception {
+  public void to_comment() throws Exception {
     FieldDiffs diffs = new FieldDiffs();
     diffs.setDiff("severity", "INFO", "BLOCKER");
     diffs.setUserLogin("emmerik");
     diffs.setCreationDate(null);
 
-    IssueChangeDto dto = IssueChangeDto.of("ABCDE", diffs);
+    DefaultIssueComment comment = IssueChangeDto.of("ABCDE", diffs).toComment();
+
 
-    assertThat(dto.getChangeData()).isEqualTo("severity=INFO|BLOCKER");
-    assertThat(dto.getChangeType()).isEqualTo("diff");
-    assertThat(dto.getCreatedAt()).isNotNull();
-    assertThat(dto.getUpdatedAt()).isNotNull();
-    assertThat(dto.getIssueChangeCreationDate()).isNull();
-    assertThat(dto.getIssueKey()).isEqualTo("ABCDE");
-    assertThat(dto.getUserLogin()).isEqualTo("emmerik");
   }
 
   @Test
index e9d9846ba471f2a3956a8a9a12689db0b9006c13..a2c2d46c1a3c9dbd5ebea97079f18a7bc8228f59 100644 (file)
@@ -33,7 +33,7 @@ import static com.google.common.collect.Lists.newArrayList;
 
 public class RuleDocumentParser {
 
-  private void RuleDocumentParser() {
+  private RuleDocumentParser() {
     // Utility class
   }