Skip to content

Commit

Permalink
Fixing tests for JsonToBeanConverter to avoid "error" key collision t…
Browse files Browse the repository at this point in the history
…hat has got new semantics in the standard
  • Loading branch information
barancev committed Oct 11, 2015
1 parent 79a1fdb commit 6967db0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void testShouldUseAMapToRepresentComplexObjects() throws Exception {
@Test
public void testShouldConvertAResponseWithAnElementInIt() throws Exception {
String json =
"{\"value\":{\"value\":\"\",\"text\":\"\",\"selected\":false,\"enabled\":true,\"id\":\"three\"},\"context\":\"con\",\"sessionId\":\"sess\",\"error\":false}";
"{\"value\":{\"value\":\"\",\"text\":\"\",\"selected\":false,\"enabled\":true,\"id\":\"three\"},\"context\":\"con\",\"sessionId\":\"sess\"}";
Response converted = new JsonToBeanConverter().convert(Response.class, json);

Map<?,?> value = (Map<?,?>) converted.getValue();
Expand All @@ -188,7 +188,7 @@ public void testConvertABlankStringAsAStringEvenWhenAskedToReturnAnObject() thro
@Test
public void testShouldBeAbleToCopeWithStringsThatLookLikeBooleans() throws Exception {
String json =
"{\"value\":\"false\",\"context\":\"foo\",\"sessionId\":\"1210083863107\",\"error\":false}";
"{\"value\":\"false\",\"context\":\"foo\",\"sessionId\":\"1210083863107\"}";

try {
new JsonToBeanConverter().convert(Response.class, json);
Expand All @@ -201,7 +201,7 @@ public void testShouldBeAbleToCopeWithStringsThatLookLikeBooleans() throws Excep
@Test
public void testShouldBeAbleToSetAnObjectToABoolean() throws Exception {
String json =
"{\"value\":true,\"context\":\"foo\",\"sessionId\":\"1210084658750\",\"error\":false}";
"{\"value\":true,\"context\":\"foo\",\"sessionId\":\"1210084658750\"}";

Response response = new JsonToBeanConverter().convert(Response.class, json);

Expand Down

0 comments on commit 6967db0

Please sign in to comment.