Exemplo n.º 1
0
 public void testXpathMatching() {
   XMLTestUtils.assertXPath("<wrap>hello</wrap>", "/wrap", "hello");
   XMLTestUtils.assertXPath("<wrap>hello</wrap>", "wrap", "hello");
   XMLTestUtils.assertXPath(
       "<wrap><price ugh=\"x\" grossRetailPrice=\"200.0\">cost</price></wrap>",
       "//wrap/price",
       "cost");
   XMLTestUtils.assertXPath(
       "<wrap><price ugh=\"x\" grossRetailPrice=\"200.0\">cost</price></wrap>", "//price", "cost");
   XMLTestUtils.assertXPath(
       "<wrap><price ugh=\"x\" grossRetailPrice=\"200.0\">cost</price></wrap>",
       "//wrap/price/@grossRetailPrice",
       "200.0");
 }
Exemplo n.º 2
0
 public void testPatternMatching4() {
   XMLTestUtils.assertAttribute(
       "<wrap><price ugh=\"x\" grossRetailPrice=\"200.0\"/></wrap>",
       "price",
       "grossRetailPrice",
       "200.0");
 }
Exemplo n.º 3
0
 public void testPatternMatching1() {
   XMLTestUtils.assertMatches("<hello/>", "<hello/>");
 }
Exemplo n.º 4
0
 public void testPatternMatching2() {
   XMLTestUtils.assertAttribute(
       "<price grossRetailPrice=\"200.0\"/>", "price", "grossRetailPrice", "200.0");
 }