* 'org.apache.lucene.gdata.gom.core.GOMContentImpl.writeRssOutput(GOMOutputWriter)'
*/
public void testWriteRssOutputGOMOutputWriter() throws XMLStreamException {
{
StringWriter stW = new StringWriter();
GOMOutputWriter writer = new GOMStaxWriter(stW);
this.impl.writeRssOutput(writer);
assertEquals("<description/>", stW.toString());
}
{
this.impl.setSrc("http://www.apache.org");
this.impl.setAtomMediaType(AtomMediaType.TEXT);
StringWriter stW = new StringWriter();
GOMOutputWriter writer = new GOMStaxWriter(stW);
this.impl.writeRssOutput(writer);
assertEquals("<link>http://www.apache.org</link>", stW.toString());
}
{
this.impl.setSrc(null);
this.impl.setAtomMediaType(AtomMediaType.TEXT);
this.impl.setTextValue("test");
StringWriter stW = new StringWriter();
GOMOutputWriter writer = new GOMStaxWriter(stW);
this.impl.writeRssOutput(writer);
assertEquals("<description>test</description>", stW.toString());
}
{
this.impl.setAtomMediaType(null);
this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI,
"type"), "image/jpeg");
StringWriter stW = new StringWriter();
GOMOutputWriter writer = new GOMStaxWriter(stW);
this.impl.writeRssOutput(writer);
assertEquals("<content type=\"image/jpeg\">test</content>", stW
.toString());
}