From 9dd0a4cfc30a89867dbfd49bf0c7d91a81209ee7 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 19 Mar 2015 20:20:50 +0100 Subject: Complete javadoc --- .../src/main/java/org/sonar/test/JsonAssert.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sonar-testing-harness') 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; * * * + *

Usage

+ *
+ * String actual = "{}";
+ * String expected = "{}";
+ * JsonAssert.assertJson(actual).isSimilarTo(expected);
+ * 
+ * + *

Expected JSON document can be loaded from URLs:

+ *
+ * String actual = "{}";
+ * JsonAssert.assertJson(actual).isSimilarTo(getClass().getResource("MyTest/expected.json"));
+ * 
+ * * @since 5.2 */ public class JsonAssert { -- cgit v1.2.3