use of plugin.lsttokens.race.FavclassToken in project pcgen by PCGen.
the class RaceTargetSaveRestoreTest method testRaceFavClass.
@Test
public void testRaceFavClass() {
PCClass monclass = create(PCClass.class, "MonClass");
new TypeLst().parseToken(context, monclass, "Monster");
Race monster = create(Race.class, "Monster");
Race other = create(Race.class, "Other");
create(PCClass.class, "MyClass");
new FavclassToken().parseToken(context, monster, "%LIST");
new ClassToken().parseToken(context, monster, "MonClass|MyClass");
finishLoad();
pc.setRace(monster);
runRoundRobin(getPreEqualityCleanup());
assertTrue(pc.getDisplay().getFavoredClasses().contains(monclass));
assertTrue(reloadedPC.getDisplay().getFavoredClasses().contains(monclass));
reloadedPC.setRace(other);
reloadedPC.setDirty(true);
assertFalse(reloadedPC.getDisplay().getFavoredClasses().contains(monclass));
}
Aggregations