Skip to content

Commit

Permalink
Merge pull request stleary#82 from billdeng/master
Browse files Browse the repository at this point in the history
Correct the message to match the function
  • Loading branch information
stleary authored Feb 3, 2018
2 parents 77d142d + cc2ed79 commit fc881e2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/java/org/json/junit/JSONObjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public void verifyNumberOutput(){
JSONObject jsonObject = new JSONObject(new MyNumberContainer());
String actual = jsonObject.toString();
String expected = "{\"myNumber\":{\"number\":42}}";
assertEquals("Not Equal", expected , actual);
assertEquals("Equal", expected , actual);

/**
* JSONObject.put() handles objects differently than the
Expand All @@ -280,7 +280,7 @@ public void verifyNumberOutput(){
jsonObject.put("myNumber", new MyNumber());
actual = jsonObject.toString();
expected = "{\"myNumber\":42}";
assertEquals("Not Equal", expected , actual);
assertEquals("Equal", expected , actual);

/**
* Calls the JSONObject(Map) ctor, which calls wrap() for values.
Expand All @@ -293,7 +293,7 @@ public void verifyNumberOutput(){
jsonObject = new JSONObject(Collections.singletonMap("myNumber", new AtomicInteger(42)));
actual = jsonObject.toString();
expected = "{\"myNumber\":\"42\"}";
assertEquals("Not Equal", expected , actual);
assertEquals("Equal", expected , actual);

/**
* JSONObject.put() inserts the AtomicInteger directly into the
Expand All @@ -305,7 +305,7 @@ public void verifyNumberOutput(){
jsonObject.put("myNumber", new AtomicInteger(42));
actual = jsonObject.toString();
expected = "{\"myNumber\":42}";
assertEquals("Not Equal", expected , actual);
assertEquals("Equal", expected , actual);

/**
* Calls the JSONObject(Map) ctor, which calls wrap() for values.
Expand All @@ -332,7 +332,7 @@ public void verifyNumberOutput(){
jsonObject.put("myNumber", new Fraction(4,2));
actual = jsonObject.toString();
expected = "{\"myNumber\":\"4/2\"}"; // valid JSON, bug fixed
assertEquals("Not Equal", expected , actual);
assertEquals("Equal", expected , actual);
}

/**
Expand Down

0 comments on commit fc881e2

Please sign in to comment.