sahaya / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

notnullvalue check always returning true for xml response #249

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. do expect condition for any column to check notnullvalue condition:

What is the expected output? What do you see instead?

Valid request:

expect().defaultParser(Parser.XML).body("Entity_list[0].id",notNullValue()).when
().get("http://mysite.com//getlist.xml?id=123456");

expected result:
should return true.
actual result:
returning true.

Invalid request:

expect().defaultParser(Parser.XML).body("Entity_list[0].idx",notNullValue()).whe
n().get("http://mysite.com//getlist.xml?id=123456");

expected result:
should return false.
actual result:
returning true.

What version of the product are you using? On what operating system?

rest assured: 1.7
grrovy-all 2.0.0
hamcrest-all 1.1

Please provide any additional information below.

Original issue reported on code.google.com by dileep.p...@gmail.com on 13 Jul 2013 at 6:41

GoogleCodeExporter commented 9 years ago
That is actually expected behaviour even though it's a little bit unexpected. 
See FAQ #2, you should be able to do something similar for XML. 

Original comment by johan.ha...@gmail.com on 12 Nov 2013 at 3:32