use of pcgen.rules.persistence.token.ParseResult in project pcgen by PCGen.
the class GlobalQualifyTest method testFromAlignment.
@Override
@Test
public void testFromAlignment() throws PersistenceLayerException {
PCAlignment source = create(PCAlignment.class, "Source");
ParseResult result = token.parseToken(context, source, "RACE|Dwarf");
assertFalse(result.passed());
}
use of pcgen.rules.persistence.token.ParseResult in project pcgen by PCGen.
the class GlobalSABTest method processToken.
@Override
public void processToken(CDOMObject source) {
ParseResult result = token.parseToken(context, source, "Special Ability Text");
if (result != ParseResult.SUCCESS) {
result.printMessages();
fail("Test Setup Failed");
}
finishLoad();
}
use of pcgen.rules.persistence.token.ParseResult in project pcgen by PCGen.
the class GlobalSRTest method processToken.
@Override
public void processToken(CDOMObject source) {
ParseResult result = token.parseToken(context, source, "25+INT");
if (result != ParseResult.SUCCESS) {
result.printMessages();
fail("Test Setup Failed");
}
finishLoad();
}
use of pcgen.rules.persistence.token.ParseResult in project pcgen by PCGen.
the class GlobalSpellKnownTest method processToken.
@Override
public void processToken(CDOMObject source) {
ParseResult result = token.parseToken(context, source, "CLASS|Wizard=2|Fireball");
if (result != ParseResult.SUCCESS) {
result.printMessages();
fail("Test Setup Failed");
}
finishLoad();
}
use of pcgen.rules.persistence.token.ParseResult in project pcgen by PCGen.
the class RaceMonCSkillTest method testList.
@Test
public void testList() throws PersistenceLayerException {
Race source = create(Race.class, "Source");
ParseResult result = token.parseToken(context, source, "LIST");
if (result != ParseResult.SUCCESS) {
result.printMessages();
fail("Test Setup Failed");
}
result = CHOOSE_SKILL_TOKEN.parseToken(context, source, "MySkill");
if (result != ParseResult.SUCCESS) {
result.printMessages();
fail("Test Setup Failed");
}
finishLoad();
assertEquals(0, mcsFacet.getCount(id));
assertEquals(SkillCost.CROSS_CLASS, pc.getSkillCostForClass(sk, dragon));
raceInputFacet.set(id, source);
assertTrue(mcsFacet.contains(id, sk));
assertEquals(1, mcsFacet.getCount(id));
pc.incrementClassLevel(1, dragon);
pc.setDirty(true);
assertEquals(SkillCost.CLASS, pc.getSkillCostForClass(sk, dragon));
raceInputFacet.remove(id);
assertEquals(0, mcsFacet.getCount(id));
}
Aggregations