use of pcgen.io.PCGVer2Creator in project pcgen by PCGen.
the class AbstractSaveRestoreTest method runWriteRead.
protected void runWriteRead(boolean dump) {
GameMode mode = SettingsHandler.getGame();
String pcgString = (new PCGVer2Creator(pc, mode, null)).createPCGString();
if (dump)
System.err.println(pcgString);
InputStream is = new ByteArrayInputStream(pcgString.getBytes());
PCGIOHandler ioh = new PCGIOHandler();
ioh.read(reloadedPC, is, true);
assertEquals(ioh.getErrors().toString(), 0, ioh.getErrors().size());
assertEquals(ioh.getWarnings().toString(), 0, ioh.getWarnings().size());
}
use of pcgen.io.PCGVer2Creator in project pcgen by PCGen.
the class AbstractSaveRestoreTest method dumpPC.
protected void dumpPC(PlayerCharacter plchar) {
GameMode mode = SettingsHandler.getGame();
String pcgString = (new PCGVer2Creator(plchar, mode, null)).createPCGString();
System.err.println(pcgString);
}
Aggregations