Examples of booleanValueOf()


Examples of org.apache.abdera.xpath.XPath.booleanValueOf()

    assertEquals(response.getStatus(),200);
    Document<Element> result = response.getDocument();
   
    XPath xpath = abdera.getXPath();
    assertTrue(
      xpath.booleanValueOf(
        "/Result/SignatureVerifies[text()='true']",
        result));

  }
 
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.booleanValueOf()

    InputStream in = FOMTest.class.getResourceAsStream("/simple.xml");
    Document<Feed> doc = getParser().parse(in);
    Feed feed = doc.getRoot();
    XPath xpath = getXPath();
    assertEquals(xpath.evaluate("count(/a:feed)", feed), 1.0d);
    assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
    assertEquals(xpath.numericValueOf("count(/a:feed)", feed), 1.0d);
    assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
    assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
    assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
    assertEquals(xpath.selectSingleNode("..", feed.getTitleElement()), feed);
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.booleanValueOf()

    InputStream in = FOMTest.class.getResourceAsStream("/simple.xml");
    Document<Feed> doc = getParser().parse(in);
    Feed feed = doc.getRoot();
    XPath xpath = getXPath();
    assertEquals(xpath.evaluate("count(/a:feed)", feed), 1.0d);
    assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
    assertEquals(xpath.numericValueOf("count(/a:feed)", feed), 1.0d);
    assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
    assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
    assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
    assertEquals(xpath.selectSingleNode("..", feed.getTitleElement()), feed);
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.booleanValueOf()

    InputStream in = FOMTest.class.getResourceAsStream("/simple.xml");
    Document<Feed> doc = getParser().parse(in);
    Feed feed = doc.getRoot();
    XPath xpath = getXPath();
    assertEquals(xpath.evaluate("count(/a:feed)", feed), 1.0d);
    assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
    assertEquals(xpath.numericValueOf("count(/a:feed)", feed), 1.0d);
    assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
    assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
    assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
    assertEquals(xpath.selectSingleNode("..", feed.getTitleElement()), feed);
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.booleanValueOf()

    InputStream in = FOMTest.class.getResourceAsStream("/simple.xml");
    Document<Feed> doc = getParser().parse(in);
    Feed feed = doc.getRoot();
    XPath xpath = getXPath();
    assertEquals(xpath.evaluate("count(/a:feed)", feed), 1.0d);
    assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
    assertEquals(xpath.numericValueOf("count(/a:feed)", feed), 1.0d);
    assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
    assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
    assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
    assertEquals(xpath.selectSingleNode("..", feed.getTitleElement()), feed);
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.booleanValueOf()

        Document<Feed> doc = parser.parse(in);
        Feed feed = doc.getRoot();

        System.out.println(xpath.evaluate("count(/a:feed)", feed)); // 1.0
        System.out.println(xpath.numericValueOf("count(/a:feed)", feed)); // 1.0
        System.out.println(xpath.booleanValueOf("/a:feed/a:entry", feed)); // true (the feed has an entry)
        System.out.println(xpath.valueOf("/a:feed/a:entry/a:title", feed)); // Atom-Powered Robots Run Amok
        System.out.println(xpath.selectNodes("/a:feed/a:entry", feed)); // every entry
        System.out.println(xpath.selectSingleNode("/a:feed", feed));
        System.out.println(xpath.selectSingleNode("..", feed.getTitleElement()));
        System.out.println(xpath.selectSingleNode("ancestor::*", feed.getEntries().get(0)));
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.booleanValueOf()

        InputStream in = FOMTest.class.getResourceAsStream("/simple.xml");
        Document<Feed> doc = getParser().parse(in);
        Feed feed = doc.getRoot();
        XPath xpath = getXPath();
        assertEquals(1.0d, xpath.evaluate("count(/a:feed)", feed));
        assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
        assertEquals(1.0d, xpath.numericValueOf("count(/a:feed)", feed));
        assertEquals("Atom-Powered Robots Run Amok", xpath.valueOf("/a:feed/a:entry/a:title", feed));
        assertEquals(1, xpath.selectNodes("/a:feed/a:entry", feed).size());
        assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
        assertEquals(feed, xpath.selectSingleNode("..", feed.getTitleElement()));
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.booleanValueOf()

    Document<Feed> doc = parser.parse(in);
    Feed feed = doc.getRoot();
   
    System.out.println(xpath.evaluate("count(/a:feed)", feed));         // 1.0
    System.out.println(xpath.numericValueOf("count(/a:feed)", feed));   // 1.0
    System.out.println(xpath.booleanValueOf("/a:feed/a:entry", feed));          // true (the feed has an entry)
    System.out.println(xpath.valueOf("/a:feed/a:entry/a:title", feed)); // Atom-Powered Robots Run Amok
    System.out.println(xpath.selectNodes("/a:feed/a:entry", feed));     // every entry
    System.out.println(xpath.selectSingleNode("/a:feed", feed));
    System.out.println(xpath.selectSingleNode("..", feed.getTitleElement()));
    System.out.println(xpath.selectSingleNode("ancestor::*", feed.getEntries().get(0)));
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.booleanValueOf()

    InputStream in = FOMTest.class.getResourceAsStream("/simple.xml");
    Document<Feed> doc = getParser().parse(in);
    Feed feed = doc.getRoot();
    XPath xpath = getXPath();
    assertEquals(xpath.evaluate("count(/a:feed)", feed), 1.0d);
    assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
    assertEquals(xpath.numericValueOf("count(/a:feed)", feed), 1.0d);
    assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
    assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
    assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
    assertEquals(xpath.selectSingleNode("..", feed.getTitleElement()), feed);
View Full Code Here

Examples of org.apache.abdera.xpath.XPath.booleanValueOf()

    InputStream in = FOMTest.class.getResourceAsStream("/simple.xml");
    Document<Feed> doc = getParser().parse(in);
    Feed feed = doc.getRoot();
    XPath xpath = getXPath();
    assertEquals(xpath.evaluate("count(/a:feed)", feed), 1.0d);
    assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
    assertEquals(xpath.numericValueOf("count(/a:feed)", feed), 1.0d);
    assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
    assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
    assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);
    assertEquals(xpath.selectSingleNode("..", feed.getTitleElement()), feed);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.