Esempio n. 1
0
 @Test
 public void testProcessEmptyComment() {
   System.out.println("processEmptyComment");
   final InputStream s = new ByteArrayInputStream("# this is a comment".getBytes());
   final XPathProcessor instance = new XPathProcessor();
   final List<AbstractNode> result = instance.process(s);
   assertEquals(0, result.size());
 }
Esempio n. 2
0
 @Test
 public void testProcessBasic() {
   System.out.println("processBasic");
   final InputStream s = new ByteArrayInputStream(ZOO.getBytes());
   final XPathProcessor instance = new XPathProcessor();
   final List<AbstractNode> result = instance.process(s);
   assertEquals(ZOO_RESULTS.length, result.size());
   for (int i = 0; i < result.size(); i++) {
     assertEquals("Iteration " + i, ZOO_RESULTS[i], result.get(i).toString());
   }
 }
Esempio n. 3
0
 @Test
 public void testProcessAttributes2() {
   System.out.println("testProcessAttributes2");
   final InputStream s = new ByteArrayInputStream(PEOPLE2.getBytes());
   final XPathProcessor instance = new XPathProcessor();
   final List<AbstractNode> result = instance.process(s);
   assertEquals(PEOPLE_RESULTS2.length, result.size());
   for (int i = 0; i < result.size(); i++) {
     assertEquals("Iteration " + i, PEOPLE_RESULTS2[i], result.get(i).toString());
   }
 }