aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-testing-harness/src
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-01-24 17:34:28 +0100
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-01-24 17:36:21 +0100
commit777f13061197c054828d72dd656cad2dae620fdb (patch)
tree3be0b7e7584bba3d4ed953bd99ea9faadc628813 /sonar-testing-harness/src
parent0bc66b98e9515d513a494dc622993fc11c5c19bd (diff)
downloadsonarqube-777f13061197c054828d72dd656cad2dae620fdb.tar.gz
sonarqube-777f13061197c054828d72dd656cad2dae620fdb.zip
SONAR-4326 Provide webservices to add/remove tags on a rule
Diffstat (limited to 'sonar-testing-harness/src')
-rw-r--r--sonar-testing-harness/src/main/java/org/sonar/api/server/ws/WsTester.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/sonar-testing-harness/src/main/java/org/sonar/api/server/ws/WsTester.java b/sonar-testing-harness/src/main/java/org/sonar/api/server/ws/WsTester.java
index 6ae58c338cb..664cae76f43 100644
--- a/sonar-testing-harness/src/main/java/org/sonar/api/server/ws/WsTester.java
+++ b/sonar-testing-harness/src/main/java/org/sonar/api/server/ws/WsTester.java
@@ -26,6 +26,7 @@ import org.sonar.api.utils.text.JsonWriter;
import org.sonar.api.utils.text.XmlWriter;
import javax.annotation.CheckForNull;
+
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
@@ -142,6 +143,12 @@ public class WsTester {
this.status = httpStatus;
return this;
}
+
+ @Override
+ public void noContent() {
+ setStatus(204);
+ IOUtils.closeQuietly(output);
+ }
}
@@ -157,6 +164,11 @@ public class WsTester {
return this;
}
+ public Result assertNoContent() {
+ assertStatus(204);
+ return this;
+ }
+
public String outputAsString() {
return new String(response.output.toByteArray(), Charsets.UTF_8);
}