org.sonar.api.server.ws
Class WsTester.Result
java.lang.Object
org.sonar.api.server.ws.WsTester.Result
- Enclosing class:
- WsTester
public static class WsTester.Result
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
assertNoContent
public WsTester.Result assertNoContent()
outputAsString
public String outputAsString()
assertJson
public WsTester.Result assertJson(String expectedJson)
throws Exception
- Throws:
Exception
assertJson
public WsTester.Result assertJson(Class clazz,
String expectedJsonFilename)
throws Exception
- Compares JSON response with JSON file available in classpath. For example if class
is org.foo.BarTest and filename is index.json, then file must be located
at src/test/resources/org/foo/BarTest/index.json.
- Parameters:
clazz
- the test classjsonResourceFilename
- name of the file containing the expected JSON
- Throws:
Exception
Copyright © 2009-2014 SonarSource. All Rights Reserved.