use of plugin.pretokens.parser.PreSkillTotalParser in project pcgen by PCGen.
the class PreSkillTotParserTest method testNot.
/**
* @throws Exception
*/
@Test
public void testNot() throws Exception {
PreSkillTotalParser producer = new PreSkillTotalParser();
Prerequisite prereq = producer.parse("SKILLTOT", "Spot,Listen,Search=30", true, false);
assertEquals("<prereq operator=\"LT\" operand=\"30\" >\n" + "<prereq kind=\"skill\" total-values=\"true\" key=\"Spot\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "<prereq kind=\"skill\" total-values=\"true\" key=\"Listen\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "<prereq kind=\"skill\" total-values=\"true\" key=\"Search\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "</prereq>\n", prereq.toString());
}
use of plugin.pretokens.parser.PreSkillTotalParser in project pcgen by PCGen.
the class PreSkillTotParserTest method testTypeKnowledge.
@Test
public void testTypeKnowledge() throws Exception {
PreSkillTotalParser producer = new PreSkillTotalParser();
Prerequisite prereq = producer.parse("SKILLTOT", "TYPE.Knowledge=20", false, false);
assertEquals("<prereq operator=\"GTEQ\" operand=\"20\" >\n" + "<prereq kind=\"skill\" total-values=\"true\" key=\"TYPE.Knowledge\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "</prereq>\n", prereq.toString());
}
use of plugin.pretokens.parser.PreSkillTotalParser in project pcgen by PCGen.
the class PreSkillTotParserTest method test1.
/**
* @throws Exception
*/
@Test
public void test1() throws Exception {
PreSkillTotalParser producer = new PreSkillTotalParser();
Prerequisite prereq = producer.parse("SKILLTOT", "Spot,Listen,Search=30", false, false);
assertEquals("<prereq operator=\"GTEQ\" operand=\"30\" >\n" + "<prereq kind=\"skill\" total-values=\"true\" key=\"Spot\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "<prereq kind=\"skill\" total-values=\"true\" key=\"Listen\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "<prereq kind=\"skill\" total-values=\"true\" key=\"Search\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "</prereq>\n", prereq.toString());
}
use of plugin.pretokens.parser.PreSkillTotalParser in project pcgen by PCGen.
the class PreSkillTotRoundRobin method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
TokenRegistration.register(new PreSkillTotalParser());
TokenRegistration.register(new PreSkillWriter());
}
Aggregations