use of plugin.lsttokens.template.FavoredclassToken in project pcgen by PCGen.
the class TemplateTargetSaveRestoreTest method testTemplateFavoredClass.
@Test
public void testTemplateFavoredClass() {
PCClass monclass = create(PCClass.class, "MonClass");
new TypeLst().parseToken(context, monclass, "Monster");
PCTemplate monster = create(PCTemplate.class, "Monster");
create(PCClass.class, "MyClass");
new FavoredclassToken().parseToken(context, monster, "%LIST");
new ClassToken().parseToken(context, monster, "MonClass|MyClass");
finishLoad();
pc.addTemplate(monster);
runRoundRobin(getPreEqualityCleanup());
assertTrue(pc.getDisplay().getFavoredClasses().contains(monclass));
assertTrue(reloadedPC.getDisplay().getFavoredClasses().contains(monclass));
reloadedPC.removeTemplate(monster);
reloadedPC.setDirty(true);
assertFalse(reloadedPC.getDisplay().getFavoredClasses().contains(monclass));
}
Aggregations