aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-06-03 10:30:23 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-06-03 10:30:23 +0200
commitef8c10d27e6941851a4bda34f37daa4e768c8271 (patch)
tree6672400f22898108a5cfd5a547752d8da3b179b4
parent601d5ae88be21e172d9b1d756e9c72f896fe42d9 (diff)
downloadsonarqube-ef8c10d27e6941851a4bda34f37daa4e768c8271.tar.gz
sonarqube-ef8c10d27e6941851a4bda34f37daa4e768c8271.zip
SONAR-5341 Add some unit test and complete Javadoc
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java2
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java1
-rw-r--r--sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/internal/IssueJsonParserTest/search.json1
3 files changed, 3 insertions, 1 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java
index 6e4c6da2b55..ccd18193463 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java
@@ -38,7 +38,7 @@ public interface Issue {
String componentKey();
/**
- * Deprecated since 4.4
+ * Deprecated since 4.4. Use {@link #componentKey()} instead
*/
@Deprecated
Long componentId();
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java
index 6b4132be8b8..b1fc2296da0 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/IssueJsonParserTest.java
@@ -42,6 +42,7 @@ public class IssueJsonParserTest {
Issue first = list.get(0);
assertThat(first.key()).isEqualTo("ABCDE");
assertThat(first.componentKey()).isEqualTo("Action.java");
+ assertThat(first.componentId()).isEqualTo(5L);
assertThat(first.projectKey()).isEqualTo("struts");
assertThat(first.ruleKey()).isEqualTo("squid:CycleBetweenPackages");
assertThat(first.severity()).isEqualTo("CRITICAL");
diff --git a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/internal/IssueJsonParserTest/search.json b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/internal/IssueJsonParserTest/search.json
index 38ee33159f5..85235b454d8 100644
--- a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/internal/IssueJsonParserTest/search.json
+++ b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/internal/IssueJsonParserTest/search.json
@@ -3,6 +3,7 @@
{
"key": "ABCDE",
"component": "Action.java",
+ "componentId": 5,
"project": "struts",
"rule": "squid:CycleBetweenPackages",
"severity": "CRITICAL",