aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-04-07 14:56:25 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2015-04-07 14:57:04 +0200
commitfa3100e005c2fc3884ae6cce708129b71830fe91 (patch)
treecc063979da9cf26c6df99e920dcce937e075d117 /sonar-plugin-api/src/test
parent3dbfee3fe1e9d2d5f2f25135e8633377b09dd541 (diff)
downloadsonarqube-fa3100e005c2fc3884ae6cce708129b71830fe91.tar.gz
sonarqube-fa3100e005c2fc3884ae6cce708129b71830fe91.zip
SONAR-6253 Add lines count in report
Diffstat (limited to 'sonar-plugin-api/src/test')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/FileMetadataTest.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/FileMetadataTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/FileMetadataTest.java
index 7696c1afcbf..93f3a8e57d7 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/FileMetadataTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/FileMetadataTest.java
@@ -55,12 +55,11 @@ public class FileMetadataTest {
FileUtils.touch(tempFile);
FileMetadata.Metadata metadata = new FileMetadata().readMetadata(tempFile, Charsets.UTF_8);
- assertThat(metadata.lines).isEqualTo(1);
+ assertThat(metadata.lines).isEqualTo(0);
assertThat(metadata.nonBlankLines).isEqualTo(0);
assertThat(metadata.hash).isNotEmpty();
assertThat(metadata.originalLineOffsets).containsOnly(0);
assertThat(metadata.lastValidOffset).isEqualTo(0);
- assertThat(metadata.empty).isTrue();
}
@Test
@@ -74,7 +73,6 @@ public class FileMetadataTest {
assertThat(metadata.hash).isEqualTo(md5Hex("foo\nbar\nbaz"));
assertThat(metadata.originalLineOffsets).containsOnly(0, 5, 10);
assertThat(metadata.lastValidOffset).isEqualTo(13);
- assertThat(metadata.empty).isFalse();
}
@Test
@@ -263,7 +261,6 @@ public class FileMetadataTest {
assertThat(metadata.lines).isEqualTo(135);
assertThat(metadata.nonBlankLines).isEqualTo(134);
assertThat(metadata.hash).isNotEmpty();
- assertThat(metadata.empty).isFalse();
assertThat(logTester.logs(LoggerLevel.WARN).get(0)).contains("Invalid character encountered in file");
assertThat(logTester.logs(LoggerLevel.WARN).get(0)).contains(