XpathUtilsTest.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:aws-sdk-java-v2 作者:
/**
 * Tests that we can correctly pull a Byte out of an XML document.
 */
@Test
public void testAsByte() throws Exception {
    Document document = XpathUtils.documentFrom(DOCUMENT);
    XPath xpath = xpath();
    assertEquals(new Byte((byte) 123), asByte("Foo/PositiveByte", document, xpath));
    assertEquals(new Byte((byte) -99), asByte("Foo/NegativeByte", document, xpath));
    assertEquals(null, XpathUtils.asByte("Foo/Empty", document));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号