djangid / rest-assured

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

Create a PathBuilder #128

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
new PathBuilder().thirdElementIn(PERSONS).find(TITLE, 
equalTo("Johan")).path(IMAGE_NAME).build();

should translate to path: persons[2].find(matcher.matches(it.title)).image_name;

This should also work:
expect().body(thirdElementIn(PERSONS).find(TITLE, 
equalTo("Johan")).path(IMAGE_NAME), is("person.png")).when(). ..

Original issue reported on code.google.com by johan.ha...@gmail.com on 23 Oct 2011 at 9:26

GoogleCodeExporter commented 8 years ago
Also: 

from(json).getString(path(SECTIONS).firstElementIn(ITEMS).path(IMAGE, URL));

// sections.items[0].image.url

Original comment by johan.ha...@gmail.com on 23 Oct 2011 at 9:29