Search in sources :

Example 6 with PreSkillParser

use of plugin.pretokens.parser.PreSkillParser in project pcgen by PCGen.

the class PreSkillParserTest method testTypeEqualsMult.

@Test
public void testTypeEqualsMult() throws Exception {
    PreSkillParser producer = new PreSkillParser();
    Prerequisite prereq = producer.parse("SKILL", "3,TYPE=Knowledge=10,TYPE=Craft=6", false, false);
    assertEquals("<prereq operator=\"GTEQ\" operand=\"3\" >\n" + "<prereq kind=\"skill\" count-multiples=\"true\" key=\"TYPE=Knowledge\" operator=\"GTEQ\" operand=\"10\" >\n" + "</prereq>\n" + "<prereq kind=\"skill\" count-multiples=\"true\" key=\"TYPE=Craft\" operator=\"GTEQ\" operand=\"6\" >\n" + "</prereq>\n" + "</prereq>\n", prereq.toString());
}
Also used : PreSkillParser(plugin.pretokens.parser.PreSkillParser) Prerequisite(pcgen.core.prereq.Prerequisite) Test(org.junit.Test)

Example 7 with PreSkillParser

use of plugin.pretokens.parser.PreSkillParser in project pcgen by PCGen.

the class PreSkillParserTest method test2.

/**
	 * @throws Exception
	 */
@Test
public void test2() throws Exception {
    PreSkillParser producer = new PreSkillParser();
    Prerequisite prereq = producer.parse("SKILL", "2,TYPE.Knowledge=10,TYPE.Knowledge=10", false, false);
    assertEquals("<prereq operator=\"GTEQ\" operand=\"2\" >\n" + "<prereq kind=\"skill\" count-multiples=\"true\" key=\"TYPE.Knowledge\" operator=\"GTEQ\" operand=\"10\" >\n" + "</prereq>\n" + "<prereq kind=\"skill\" count-multiples=\"true\" key=\"TYPE.Knowledge\" operator=\"GTEQ\" operand=\"10\" >\n" + "</prereq>\n" + "</prereq>\n", prereq.toString());
}
Also used : PreSkillParser(plugin.pretokens.parser.PreSkillParser) Prerequisite(pcgen.core.prereq.Prerequisite) Test(org.junit.Test)

Example 8 with PreSkillParser

use of plugin.pretokens.parser.PreSkillParser in project pcgen by PCGen.

the class PreSkillMultRoundRobin method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    TokenRegistration.register(new PreSkillParser());
    TokenRegistration.register(new PreSkillMultWriter());
}
Also used : PreSkillMultWriter(plugin.pretokens.writer.PreSkillMultWriter) PreSkillParser(plugin.pretokens.parser.PreSkillParser)

Aggregations

PreSkillParser (plugin.pretokens.parser.PreSkillParser)8 Test (org.junit.Test)5 Prerequisite (pcgen.core.prereq.Prerequisite)5 PlayerCharacter (pcgen.core.PlayerCharacter)1 Skill (pcgen.core.Skill)1 PreSkillMultWriter (plugin.pretokens.writer.PreSkillMultWriter)1 PreSkillWriter (plugin.pretokens.writer.PreSkillWriter)1