Esempio n. 1
0
 @Test
 public void multipleGetsWithOneInstanceOfXmlPath() throws Exception {
   final XmlPath xmlPath = new XmlPath(XML);
   assertThat(xmlPath.getInt("shopping.category.item.size()"), equalTo(5));
   assertThat(
       xmlPath.getList("shopping.category.item.children().list()", String.class), hasItem("Pens"));
 }
Esempio n. 2
0
 @Test
 public void rootPathEndingWithDot() throws Exception {
   final XmlPath xmlPath = new XmlPath(XML).setRoot("shopping.category.item.");
   assertThat(xmlPath.getInt("size()"), equalTo(5));
   assertThat(xmlPath.getList("children().list()", String.class), hasItem("Pens"));
 }