aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-testing-harness/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-03-19 20:20:50 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-03-20 11:07:24 +0100
commit9dd0a4cfc30a89867dbfd49bf0c7d91a81209ee7 (patch)
tree976ffce6e296289a03d5001e49be5ff600bddb78 /sonar-testing-harness/src
parent88219ea163c159be7d16203be32d8f0b3d7e7d0a (diff)
downloadsonarqube-9dd0a4cfc30a89867dbfd49bf0c7d91a81209ee7.tar.gz
sonarqube-9dd0a4cfc30a89867dbfd49bf0c7d91a81209ee7.zip
Complete javadoc
Diffstat (limited to 'sonar-testing-harness/src')
-rw-r--r--sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java b/sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java
index ac9f2470da6..2632d9e2504 100644
--- a/sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java
+++ b/sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java
@@ -44,6 +44,19 @@ import java.net.URL;
* </li>
* </ul>
*
+ * <h3>Usage</h3>
+ * <pre>
+ * String actual = "{}";
+ * String expected = "{}";
+ * JsonAssert.assertJson(actual).isSimilarTo(expected);
+ * </pre>
+ *
+ * <p>Expected JSON document can be loaded from URLs:</p>
+ * <pre>
+ * String actual = "{}";
+ * JsonAssert.assertJson(actual).isSimilarTo(getClass().getResource("MyTest/expected.json"));
+ * </pre>
+ *
* @since 5.2
*/
public class JsonAssert {