@Test
public void serializeAtomEntry() throws IOException, XpathException, SAXException, XMLStreamException,
FactoryConfigurationError, ODataException {
final EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI).build();
AtomEntityProvider ser = createAtomEntityProvider();
ODataResponse response =
ser.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Rooms"), roomData, properties);
String xmlString = verifyResponse(response);
assertXpathExists("/a:entry", xmlString);
assertXpathEvaluatesTo(BASE_URI.toASCIIString(), "/a:entry/@xml:base", xmlString);
assertXpathExists("/a:entry/a:content", xmlString);
assertXpathEvaluatesTo(ContentType.APPLICATION_XML.toString(), "/a:entry/a:content/@type", xmlString);
assertXpathExists("/a:entry/a:content/m:properties", xmlString);
}
AtomEntryProducerTest.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:olingo-odata2
作者:
评论列表
文章目录