JSON matcher *any-object* is misinterpreted
See original GitHub issueHi there, thanks for your work!
I am using JSON matchers extensively in my application and I realised that in 2 HTTP responses with exactly the same JSON object (within another object), in a test I can match it with *any-object*
, but in another test, I have to fully describe it.
In both tests i am using “Then assert body.is(…)”
The failing test tells me:
“matcher any-string
(checks if the field is a String) failed for input (…)”
I have tried to match with object, so why the test fails to match with string ?
This wouldn’t be so weird if it never worked, but as i said, i works in another test, that tests exactly the same object. Any help would be very much appreciated
Issue Analytics
- State:
- Created a year ago
- Comments:19 (11 by maintainers)
Top Results From Across the Web
InvalidUseOfMatchersException when using Matchers.eq ...
This exception may occur if matchers are combined with raw values: //incorrect: someMethod(anyObject(), "raw String"); When using matchers, all ...
Read more >JsonConvert.DeserializeObject Problem when use for generic types!
I'm using this code to deserialize my json data to list of objects as follow : ... i want to use in generic...
Read more >Converting a Dictionary to JSON #133 - bignerdranch/Freddy
Is there a easy way to convert a dictionary (i.e of type [String : String], [String, AnyObject],...) without writing all this boiler plate?...
Read more >ArgumentMatchers (Mockito 2.6.2 API) - javadoc.io
Matches any object of given type, excluding nulls. This matcher will perform a type check with the given type, thus excluding values. See...
Read more >ECMA-262 Edition 5.1 - ECMAScript Language Specification
primitive value that represents the intentional absence of any object value ... The JSON grammar is used to translate a String describing a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually, we have a fork of play 2.5 and that wouldn’t work for us. I have to push the Core team to get up to date with that, and also with the version of your lib, cause we use currently the 0.19.3, but I want all the recent goodies 😃
Thanks, I think I have an idea 👍