diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-03-16 14:19:55 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-03-16 14:28:41 +0100 |
commit | 46e1d76cc3814518f23b65132e5a8f083bb707a5 (patch) | |
tree | 515578f952a328da19a653d425850a5807d53464 /sonar-batch | |
parent | 008f29b5613739b2da1db8596bc92f103eca427e (diff) | |
download | sonarqube-46e1d76cc3814518f23b65132e5a8f083bb707a5.tar.gz sonarqube-46e1d76cc3814518f23b65132e5a8f083bb707a5.zip |
Remove use of DateUtils.truncate since it is not efficient
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/issue/ModuleIssuesTest.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/issue/ModuleIssuesTest.java b/sonar-batch/src/test/java/org/sonar/batch/issue/ModuleIssuesTest.java index 7ffa9905721..5ac780e3883 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/issue/ModuleIssuesTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/issue/ModuleIssuesTest.java @@ -19,7 +19,6 @@ */ package org.sonar.batch.issue; -import org.apache.commons.lang.time.DateUtils; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -40,7 +39,6 @@ import org.sonar.api.rules.Violation; import org.sonar.api.utils.Duration; import org.sonar.api.utils.MessageException; -import java.util.Calendar; import java.util.Date; import static org.assertj.core.api.Assertions.assertThat; @@ -154,7 +152,7 @@ public class ModuleIssuesTest { ArgumentCaptor<DefaultIssue> argument = ArgumentCaptor.forClass(DefaultIssue.class); verify(cache).put(argument.capture()); assertThat(argument.getValue().severity()).isEqualTo(Severity.CRITICAL); - assertThat(argument.getValue().creationDate()).isEqualTo(DateUtils.truncate(analysisDate, Calendar.SECOND)); + assertThat(argument.getValue().creationDate()).isEqualTo(analysisDate); } @Test @@ -173,7 +171,7 @@ public class ModuleIssuesTest { ArgumentCaptor<DefaultIssue> argument = ArgumentCaptor.forClass(DefaultIssue.class); verify(cache).put(argument.capture()); assertThat(argument.getValue().severity()).isEqualTo(Severity.INFO); - assertThat(argument.getValue().creationDate()).isEqualTo(DateUtils.truncate(analysisDate, Calendar.SECOND)); + assertThat(argument.getValue().creationDate()).isEqualTo(analysisDate); } @Test |