Exemplo n.º 1
0
 @Test
 public void test6() {
   ElementSelector p = new ElementSelector("//a//b");
   assertEquals(2, p.size());
   assertEquals("a", p.get(0));
   assertEquals("b", p.get(1));
 }
Exemplo n.º 2
0
 @Test
 public void testSuffix() {
   ElementSelector p = new ElementSelector("a/");
   assertEquals(1, p.size());
   assertEquals("a", p.peekLast());
   assertEquals("a", p.get(0));
 }
Exemplo n.º 3
0
 @Test
 public void test4() {
   ElementSelector p = new ElementSelector("/a123/b1234/cvvsdf");
   assertEquals(3, p.size());
   assertEquals("a123", p.get(0));
   assertEquals("b1234", p.get(1));
   assertEquals("cvvsdf", p.get(2));
 }
Exemplo n.º 4
0
 @Test
 public void test2() {
   ElementSelector p = new ElementSelector("a/b");
   assertEquals(2, p.size());
   assertEquals("b", p.peekLast());
   assertEquals("a", p.get(0));
   assertEquals("b", p.get(1));
 }
Exemplo n.º 5
0
 @Test
 public void test5() {
   ElementSelector p = new ElementSelector("//a");
   assertEquals(1, p.size());
   assertEquals("a", p.get(0));
 }