diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-02-06 11:17:20 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-02-06 11:17:32 +0100 |
commit | 12c14f0149b0ed09041e5c13fcf12d5cf31b61ea (patch) | |
tree | 47109a86b12b4fd8398cc4989b65c6287eb2a44e /sonar-core | |
parent | 42f969e3ab38d2c11b3fc2ddab83e1e8cd551639 (diff) | |
download | sonarqube-12c14f0149b0ed09041e5c13fcf12d5cf31b61ea.tar.gz sonarqube-12c14f0149b0ed09041e5c13fcf12d5cf31b61ea.zip |
Fix quality flaws
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java index 10dba57cd7f..408ced20c9d 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java @@ -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 |