use of com.thoughtworks.xstream.XStream in project weixin-java-tools by chanjarster.
the class XStreamTransformer method config_WxMpXmlOutNewsMessage.
private static XStream config_WxMpXmlOutNewsMessage() {
XStream xstream = XStreamInitializer.getInstance();
xstream.processAnnotations(WxMpXmlOutMessage.class);
xstream.processAnnotations(WxMpXmlOutNewsMessage.class);
xstream.processAnnotations(WxMpXmlOutNewsMessage.Item.class);
return xstream;
}
use of com.thoughtworks.xstream.XStream in project weixin-java-tools by chanjarster.
the class XStreamTransformer method config_WxMpXmlOutMusicMessage.
private static XStream config_WxMpXmlOutMusicMessage() {
XStream xstream = XStreamInitializer.getInstance();
xstream.processAnnotations(WxMpXmlOutMessage.class);
xstream.processAnnotations(WxMpXmlOutMusicMessage.class);
xstream.processAnnotations(WxMpXmlOutMusicMessage.Music.class);
return xstream;
}
use of com.thoughtworks.xstream.XStream in project weixin-java-tools by chanjarster.
the class XStreamTransformer method config_WxMpXmlOutTextMessage.
private static XStream config_WxMpXmlOutTextMessage() {
XStream xstream = XStreamInitializer.getInstance();
xstream.processAnnotations(WxMpXmlOutMessage.class);
xstream.processAnnotations(WxMpXmlOutTextMessage.class);
return xstream;
}
use of com.thoughtworks.xstream.XStream in project eureka by Netflix.
the class XmlCodecTest method testEncodingDecodingWithMetaData.
@Test
public void testEncodingDecodingWithMetaData() throws Exception {
Applications applications = InstanceInfoGenerator.newBuilder(10, 2).withMetaData(true).build().toApplications();
XStream xstream = XmlXStream.getInstance();
String xmlDocument = xstream.toXML(applications);
Applications decodedApplications = (Applications) xstream.fromXML(xmlDocument);
assertThat(EurekaEntityComparators.equal(decodedApplications, applications), is(true));
}
use of com.thoughtworks.xstream.XStream in project eureka by Netflix.
the class XmlCodecTest method testEncodingDecodingWithoutMetaData.
@Test
public void testEncodingDecodingWithoutMetaData() throws Exception {
Applications applications = InstanceInfoGenerator.newBuilder(10, 2).withMetaData(false).build().toApplications();
XStream xstream = XmlXStream.getInstance();
String xmlDocument = xstream.toXML(applications);
Applications decodedApplications = (Applications) xstream.fromXML(xmlDocument);
assertThat(EurekaEntityComparators.equal(decodedApplications, applications), is(true));
}
Aggregations