Skip to content

Commit 5aab865

Browse files
committed
Update README.md
1 parent e233985 commit 5aab865

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,28 @@ NOT this (ouch!):
3939
Assert.fail("Expected either Carter or Corby, Got: " + friend1Obj.getString("name"));
4040
}
4141

42+
* * *
43+
44+
QuickStart
45+
----------
46+
47+
Add the following to your project's pom.xml:
48+
49+
<dependency>
50+
<groupId>org.skyscreamer</groupId>
51+
<artifactId>jsonassert</artifactId>
52+
<version>0.9.0</version>
53+
</dependency>
54+
55+
And use JSONAssert.assertEquals just like you'd used Assert.assertEquals in existing JUnit test cases. That's it.
56+
57+
Behind the scenes, JSONAssert, converts your "expected" string to a JSON object, and compares that to the result you want to test. It performs a logical comparison -- much like the don't-do-this example above, but a lot cleaner. On test failure, the result messages are very specific and should simplify troubleshooting.
58+
59+
4260
* * *
4361

4462
Resources
4563
---------
4664

4765
[JavaDoc](http://skyscreamer.org/JSONassert/javadoc/)
66+

0 commit comments

Comments
 (0)