-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
Milestone
Description
Line 295 in 87c5b5a
throw new AssertionError("No value at JSON path \"" + this.expression + "\"", ex); |
This is the code I was running
.andExpect(jsonPath("$.myRootObject.content").value(myObject.getContent()))
In json path the returned value has the datatype String
. Somehow I wrongly put byte[]
in the expected. myObject.getContent()
returns byte[]
. So I was trying to compare String
with byte[]
. The error received should be ClassCastException
. No Value at JSON Path
is misleading message.
So there is value at the JSON path, its just that there is mismatch in the type. Value is present , so thrown error should give more specific issue , which is with expected and not with actual.