use of plugin.lsttokens.domain.CcskillToken in project pcgen by PCGen.
the class DomainTargetSaveRestoreTest method testDomainCCSkill.
@Test
public void testDomainCCSkill() {
Skill granted = create(Skill.class, "Granted");
new ExclusiveToken().parseToken(context, granted, "Yes");
Domain target = create(getObjectClass(), "Target");
create(Skill.class, "MySkill");
new CcskillToken().parseToken(context, target, "LIST");
new SkillToken().parseToken(context, target, "Granted|MySkill");
Object o = prepare(target);
finishLoad();
applyObject(target);
PCClass myclass = pc.getClassKeyed("MyClass");
assertEquals(SkillCost.CROSS_CLASS, pc.getSkillCostForClass(granted, myclass));
runRoundRobin(getPreEqualityCleanup());
assertEquals(SkillCost.CROSS_CLASS, pc.getSkillCostForClass(granted, myclass));
myclass = reloadedPC.getClassKeyed("MyClass");
assertEquals(SkillCost.CROSS_CLASS, reloadedPC.getSkillCostForClass(granted, myclass));
remove(o);
reloadedPC.setDirty(true);
assertEquals(SkillCost.EXCLUSIVE, reloadedPC.getSkillCostForClass(granted, myclass));
}
Aggregations