/**
* 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));
}
XpathUtilsTest.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:aws-sdk-java-v2
作者:
评论列表
文章目录