aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/test
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-05-30 19:18:32 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-05-30 19:19:12 +0200
commita7ef4f0a1d3c51ab9f74a8ac4bd695fe84c947eb (patch)
treeabaeed322b7a16d2d9dff671ea429f9fa64a4064 /sonar-ws-client/src/test
parent3cd3a7dcc73cb3924d8c61f532423226bb38b38b (diff)
downloadsonarqube-a7ef4f0a1d3c51ab9f74a8ac4bd695fe84c947eb.tar.gz
sonarqube-a7ef4f0a1d3c51ab9f74a8ac4bd695fe84c947eb.zip
SONAR-2453 Update the way "FALSE-POSITIVE" reviews are managed
Add the violation id on a review JSON/XML format so that we don't have to add it later when we implement manual reviews.
Diffstat (limited to 'sonar-ws-client/src/test')
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/ReviewDeleteQueryTest.java1
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ReviewUnmarshallerTest.java1
-rw-r--r--sonar-ws-client/src/test/resources/reviews/reviews-2.9.json2
3 files changed, 2 insertions, 2 deletions
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ReviewDeleteQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ReviewDeleteQueryTest.java
index ff2b22dadf8..d78bcf39baf 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ReviewDeleteQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ReviewDeleteQueryTest.java
@@ -30,7 +30,6 @@ public class ReviewDeleteQueryTest extends QueryTestCase {
public void testAddComment() {
ReviewDeleteQuery query = ReviewDeleteQuery.deleteCommentQuery(13L, 2L);
assertThat(query.getUrl(), is("/api/reviews/?id=13&comment_id=2&"));
- assertThat(query.getModelClass().getName(), is(Review.class.getName()));
}
} \ No newline at end of file
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ReviewUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ReviewUnmarshallerTest.java
index d2c4cc73564..9041c11a06a 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ReviewUnmarshallerTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ReviewUnmarshallerTest.java
@@ -55,6 +55,7 @@ public class ReviewUnmarshallerTest extends UnmarshallerTestCase {
assertThat(review.getSeverity(), is("MINOR"));
assertThat(review.getResourceKee(), is("org.codehaus.sonar:sonar-channel:org.sonar.channel.CodeReaderConfiguration"));
assertThat(review.getLine(), is(33));
+ assertThat(review.getViolationId(), is(1L));
List<Comment> comments = review.getComments();
assertThat(comments.size(), is(4));
Comment comment = comments.get(0);
diff --git a/sonar-ws-client/src/test/resources/reviews/reviews-2.9.json b/sonar-ws-client/src/test/resources/reviews/reviews-2.9.json
index 707438bbd31..8b1f11c62a8 100644
--- a/sonar-ws-client/src/test/resources/reviews/reviews-2.9.json
+++ b/sonar-ws-client/src/test/resources/reviews/reviews-2.9.json
@@ -1 +1 @@
-[{"id":3,"createdAt":"2011-04-26T15:44:42+0200","updatedAt":"2011-04-26T15:44:42+0200","author":"admin","assignee":"admin","title":"'static' modifier out of order with the JLS suggestions.","falsePositive":false,"status":"OPEN","severity":"MINOR","resource":"org.codehaus.sonar:sonar-channel:org.sonar.channel.CodeReaderConfiguration","line":33,"comments":[{"id":1,"author":"admin","updatedAt":"2011-04-26T15:44:42+0200","text":"This is a review.<br/>And this is on multiple lines...<br/><br/><code>Wouhou!!!!!</code>"},{"id":2,"author":"admin","updatedAt":"2011-04-26T17:10:19+0200","text":"<em>Bold on multiple line?</em>"},{"id":3,"author":"admin","updatedAt":"2011-04-26T17:11:02+0200","text":"And the bullets:<br/><ul><li>1 bullet</li>\n<li>2 bullets</li></ul>"},{"id":4,"author":"admin","updatedAt":"2011-04-26T17:27:37+0200","text":"Wazzaa"}]},{"id":9,"createdAt":"2011-04-27T14:37:20+0200","updatedAt":"2011-04-27T14:37:20+0200","author":"admin","title":"New exception is thrown in catch block, original stack trace may be lost","falsePositive":true,"status":"OPEN","severity":"MAJOR","resource":"org.codehaus.sonar:sonar-channel:org.sonar.channel.CodeReader","line":84,"comments":[{"id":5,"author":"admin","updatedAt":"2011-04-27T14:37:20+0200","text":"Wazzaaaa"}]}] \ No newline at end of file
+[{"id":3,"createdAt":"2011-04-26T15:44:42+0200","updatedAt":"2011-04-26T15:44:42+0200","author":"admin","assignee":"admin","title":"'static' modifier out of order with the JLS suggestions.","falsePositive":false,"status":"OPEN","severity":"MINOR","resource":"org.codehaus.sonar:sonar-channel:org.sonar.channel.CodeReaderConfiguration","line":33,"violationId":1,"comments":[{"id":1,"author":"admin","updatedAt":"2011-04-26T15:44:42+0200","text":"This is a review.<br/>And this is on multiple lines...<br/><br/><code>Wouhou!!!!!</code>"},{"id":2,"author":"admin","updatedAt":"2011-04-26T17:10:19+0200","text":"<em>Bold on multiple line?</em>"},{"id":3,"author":"admin","updatedAt":"2011-04-26T17:11:02+0200","text":"And the bullets:<br/><ul><li>1 bullet</li>\n<li>2 bullets</li></ul>"},{"id":4,"author":"admin","updatedAt":"2011-04-26T17:27:37+0200","text":"Wazzaa"}]},{"id":9,"createdAt":"2011-04-27T14:37:20+0200","updatedAt":"2011-04-27T14:37:20+0200","author":"admin","title":"New exception is thrown in catch block, original stack trace may be lost","falsePositive":true,"status":"OPEN","severity":"MAJOR","resource":"org.codehaus.sonar:sonar-channel:org.sonar.channel.CodeReader","line":84,"violationId":2,"comments":[{"id":5,"author":"admin","updatedAt":"2011-04-27T14:37:20+0200","text":"Wazzaaaa"}]}] \ No newline at end of file