Methods Summary |
---|
protected void | setUp()
this.impl = new GOMIdImpl();
|
public void | testProcessElementValue()
this.impl.processElementValue("test");
assertEquals("test", this.impl.getTextValue());
|
public void | testProcessEndElement()
try {
this.impl.processEndElement();
fail("not set");
} catch (GDataParseException e) {
//
}
this.impl.setTextValue("testme");
this.impl.processEndElement();
|
public void | testWriteAtomOutput()
{
StringWriter stW = new StringWriter();
GOMOutputWriter writer = new GOMStaxWriter(stW);
this.impl.writeAtomOutput(writer);
assertEquals("<id/>", stW.toString());
}
{
this.impl.setTextValue("testme");
StringWriter stW = new StringWriter();
GOMOutputWriter writer = new GOMStaxWriter(stW);
this.impl.writeAtomOutput(writer);
assertEquals("<id>testme</id>", stW.toString());
}
|
public void | testWriteRssOutputGOMOutputWriter()
{
StringWriter stW = new StringWriter();
GOMOutputWriter writer = new GOMStaxWriter(stW);
this.impl.writeRssOutput(writer);
assertEquals("<atom:id/>", stW.toString());
}
{
this.impl.setTextValue("testme");
StringWriter stW = new StringWriter();
GOMOutputWriter writer = new GOMStaxWriter(stW);
this.impl.writeRssOutput(writer);
assertEquals("<atom:id>testme</atom:id>", stW.toString());
}
{
this.impl.setTextValue("testme");
StringWriter stW = new StringWriter();
GOMOutputWriter writer = new GOMStaxWriter(stW);
this.impl.writeRssOutput(writer, "guid");
assertEquals("<guid>testme</guid>", stW.toString());
}
|