Skip to content

Commit 3ca08b5

Browse files
committed
Merge remote-tracking branch 'upstream/master'
Conflicts: src/main/java/org/skyscreamer/jsonassert/JSONCompareResult.java
2 parents 70aee76 + 59f118b commit 3ca08b5

9 files changed

Lines changed: 34 additions & 6 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Changelog
2+
=========
3+
4+
Version 1.1.0 - 9/3/2012
5+
------------------------
6+
- Added withStrictOrdering() and withExtensible() to JSONCompareMode
7+
- Javadoc fixes
8+
- Fix bug where expected and actual were reversed
9+
- Fix bug where nulls gave false positives in some cases
10+
- Simplified publishing Javadocs
11+
12+
Version 1.0.0 - 4/5/2012
13+
------------------------
14+
Initial release!
15+

‎README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,26 @@ To use, [download the JAR](https://github.com/skyscreamer/JSONassert/downloads)
7676
<dependency>
7777
<groupId>org.skyscreamer</groupId>
7878
<artifactId>jsonassert</artifactId>
79-
<version>1.0.0</version>
79+
<version>1.1.0</version>
8080
</dependency>
8181

8282
Write tests like this:
8383

8484
<code>JSONAssert.assertEquals(<i>expectedJSONString</i>, <i>actualJSON</i>, <i>strictMode</i>);</code>
8585

86-
[Some real-world examples](https://github.com/skyscreamer/yoga/tree/master/yoga-demos/yoga-demo-shared/src/main/java/org/skyscreamer/yoga/demo/test)
86+
[More examples in our cookbook](http://jsonassert.skyscreamer.org/cookbook.html)
8787

8888
* * *
8989

9090
Who uses JSONassert?
9191
--------------------
9292
+ [yoga](https://github.com/skyscreamer/yoga) - A relational REST framework
93+
+ [hamcrest-json](https://github.com/hertzsprung/hamcrest-json) - Hamcrest matchers for comparing JSON documents
9394

9495
* * *
9596

9697
Resources
9798
---------
9899

99-
[JavaDoc](http://skyscreamer.org/JSONassert/javadoc/)
100+
[JavaDoc](http://jsonassert.skyscreamer.org/apidocs/index.html)
100101

‎pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<groupId>org.skyscreamer</groupId>
1212
<artifactId>jsonassert</artifactId>
13-
<version>1.0.1-SNAPSHOT</version>
13+
<version>1.1.1-SNAPSHOT</version>
1414
<packaging>jar</packaging>
1515

1616
<name>JSONassert</name>

‎src/main/java/org/skyscreamer/jsonassert/JSONAssert.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
*
3939
*/
4040
public class JSONAssert {
41+
private JSONAssert() {}
42+
4143
/**
4244
* Asserts that the JSONObject provided matches the expected string. If it isn't it throws an
4345
* {@link AssertionError}.

‎src/main/java/org/skyscreamer/jsonassert/JSONCompare.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* non-JUnit test framework)
1414
*/
1515
public class JSONCompare {
16+
private JSONCompare() {}
17+
1618
/**
1719
* Compares JSON string provided to the expected JSON string, and returns the results of the comparison.
1820
*

‎src/main/java/org/skyscreamer/jsonassert/JSONCompareResult.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ protected void fail(String message) {
9595
}
9696
}
9797

98+
/**
99+
* Identify that the comparison failed
100+
* @param field Which field failed
101+
* @param expected Expected result
102+
* @param actual Actual result
103+
*/
98104
protected JSONCompareResult fail(String field, Object expected, Object actual) {
99105
this._field = field;
100106
this._expected = expected;

‎src/main/java/org/skyscreamer/jsonassert/JSONParser.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
* Simple JSON parsing utility.
99
*/
1010
public class JSONParser {
11+
private JSONParser() {}
12+
1113
/**
1214
* Takes a JSON string and returns either a {@link org.json.JSONObject} or {@link org.json.JSONArray},
1315
* depending on whether the string represents an object or an array.

‎src/site/resources/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h2>Introduction</h2>
5151
<li><a href="http://junit.org" target="_blank">JUnit</a></li>
5252
</ul>
5353

54-
<p><br/>The current version of JSONassert is 1.0.0.</p>
54+
<p><br/>The current version of JSONassert is 1.0.1.</p>
5555

5656
<h2>Examples</h2>
5757

‎src/site/resources/quickstart.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h2>Quick Start</h2>
4949
<a>&lt;dependency&gt;</a><br/>
5050
<a> &nbsp; &lt;groupId&gt;org.skyscreamer&lt;/groupId&gt;</a><br/>
5151
<a> &nbsp; &lt;artifactId&gt;jsonassert&lt;/artifactId&gt;</a><br/>
52-
<a> &nbsp; &lt;version&gt;1.0.0&lt;/version&gt;</a><br/>
52+
<a> &nbsp; &lt;version&gt;1.0.1&lt;/version&gt;</a><br/>
5353
<a>&lt;/dependency&gt;</a><br/>
5454
</blockquote>
5555
</div>

0 commit comments

Comments
 (0)