I am working on a class that gets json values and saves them.
Then uses the saved attributes to dynamically make a the ¨.put¨ json.
basically
.check(jsonPath(“$.id”).saveAs(“Id”))
.check(jsonPath(“$.accepted”).saveAs(“accepted”))
.check(jsonPath(“$.totalAmount”).saveAs(“Amounts”))
.check(jsonPath(“$.totalCommission”).saveAs(“TotalCommission”))
everything works fine UNTIL…
one of the 100 accounts that I use has a NULL value.
{
“id”:11111,
“accepted”:false,
“revisionDetails”:{
“totalAmount”:“0.000000”,
“totalCommission”:null, <= (problem)
If I hard code null everything works, but then the other 99 users have a problem.
No attribute named 'TotalCommission´ 1 (50.00%)
is defined
I have tried different approches but am a little bit lost, because null needs to be in the json but I think it cannot be a attribute?
TNX