diff options
Diffstat (limited to 'sonar-testing-harness/src/main')
-rw-r--r-- | sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java | 13 |
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 { |