diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-01-24 17:34:28 +0100 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-01-24 17:36:21 +0100 |
commit | 777f13061197c054828d72dd656cad2dae620fdb (patch) | |
tree | 3be0b7e7584bba3d4ed953bd99ea9faadc628813 /sonar-testing-harness/src | |
parent | 0bc66b98e9515d513a494dc622993fc11c5c19bd (diff) | |
download | sonarqube-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.java | 12 |
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); } |