Examples of XmlDataHandler


Examples of com.ibm.sbt.services.client.base.datahandlers.XmlDataHandler

    return id;
  }

  @Override
  public Person getAuthor(){
    return new Person(getService(),new XmlDataHandler((Node)getDataHandler().getData(),
          nameSpaceCtx, (XPathExpression)AtomXPath.author.getPath()));
  }
View Full Code Here

Examples of com.ibm.sbt.services.client.base.datahandlers.XmlDataHandler

          nameSpaceCtx, (XPathExpression)AtomXPath.author.getPath()));
  }

  @Override
  public Person getContributor(){
    return new Person(getService(), new XmlDataHandler((Node)getDataHandler().getData(),
          nameSpaceCtx, (XPathExpression)AtomXPath.contributor.getPath()));
  }
View Full Code Here

Examples of com.ibm.sbt.services.client.base.datahandlers.XmlDataHandler

  *
  * @return Author
  */
  @Override
  public Person getAuthor(){
    return new Person(getService(),new XmlDataHandler((Node)this.getDataHandler().getData(),
          nameSpaceCtx, (XPathExpression)AtomXPath.author.getPath()));
  }
View Full Code Here

Examples of com.ibm.sbt.services.client.base.datahandlers.XmlDataHandler

  *
  * @return Author
  */
  @Override
  public Person getContributor(){
    return new Person(getService(),new XmlDataHandler((Node)this.getDataHandler().getData(),
          nameSpaceCtx, (XPathExpression)AtomXPath.contributor.getPath()));
  }
View Full Code Here

Examples of net.sf.uadetector.internal.data.XmlDataHandler

    public static void parse(@Nonnull final InputStream stream, @Nonnull final DataBuilder builder)
        throws ParserConfigurationException, SAXException, IOException {
      final SAXParserFactory factory = SAXParserFactory.newInstance();
      factory.setValidating(true);
      final SAXParser parser = factory.newSAXParser();
      final XmlDataHandler handler = new XmlDataHandler(builder);
      parser.parse(stream, handler);
      validate(handler);
    }
View Full Code Here

Examples of net.sf.uadetector.internal.data.XmlDataHandler

@PrepareForTest(XmlDataHandler.class)
public class XmlParserTest {

  @Test(expected = IllegalStateException.class)
  public void validate_hasError() {
    final XmlDataHandler mock = PowerMock.createMock(XmlDataHandler.class);
    EasyMock.expect(mock.hasError()).andReturn(true).anyTimes();
    EasyMock.expect(mock.hasWarning()).andReturn(false).anyTimes();
    PowerMock.replay(mock);

    XmlParser.validate(mock);

    PowerMock.verify(mock);
View Full Code Here

Examples of net.sf.uadetector.internal.data.XmlDataHandler

    PowerMock.verify(mock);
  }

  @Test(expected = IllegalStateException.class)
  public void validate_hasErrorAndWarning() {
    final XmlDataHandler mock = PowerMock.createMock(XmlDataHandler.class);
    EasyMock.expect(mock.hasError()).andReturn(true).anyTimes();
    EasyMock.expect(mock.hasWarning()).andReturn(true).anyTimes();
    PowerMock.replay(mock);

    XmlParser.validate(mock);

    PowerMock.verify(mock);
View Full Code Here

Examples of net.sf.uadetector.internal.data.XmlDataHandler

    PowerMock.verify(mock);
  }

  @Test
  public void validate_hasWarning() {
    final XmlDataHandler mock = PowerMock.createMock(XmlDataHandler.class);
    EasyMock.expect(mock.hasError()).andReturn(false).anyTimes();
    EasyMock.expect(mock.hasWarning()).andReturn(true).anyTimes();
    PowerMock.replay(mock);

    XmlParser.validate(mock);

    PowerMock.verify(mock);
View Full Code Here

Examples of net.sf.uadetector.internal.data.XmlDataHandler

    PowerMock.verify(mock);
  }

  @Test
  public void validate_noErrorAndWarning() {
    final XmlDataHandler mock = PowerMock.createMock(XmlDataHandler.class);
    EasyMock.expect(mock.hasError()).andReturn(false).anyTimes();
    EasyMock.expect(mock.hasWarning()).andReturn(false).anyTimes();
    PowerMock.replay(mock);

    XmlParser.validate(mock);

    PowerMock.verify(mock);
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.