use of pcgen.core.prereq.Prerequisite in project pcgen by PCGen.
the class PreSkillParserTest method test1.
/**
* @throws Exception
*/
@Test
public void test1() throws Exception {
PreSkillParser producer = new PreSkillParser();
Prerequisite prereq = producer.parse("SKILL", "3,Decipher Script=7,Disable Device=7,Escape Artist=7", false, false);
assertEquals("<prereq operator=\"GTEQ\" operand=\"3\" >\n" + "<prereq kind=\"skill\" count-multiples=\"true\" key=\"Decipher Script\" operator=\"GTEQ\" operand=\"7\" >\n" + "</prereq>\n" + "<prereq kind=\"skill\" count-multiples=\"true\" key=\"Disable Device\" operator=\"GTEQ\" operand=\"7\" >\n" + "</prereq>\n" + "<prereq kind=\"skill\" count-multiples=\"true\" key=\"Escape Artist\" operator=\"GTEQ\" operand=\"7\" >\n" + "</prereq>\n" + "</prereq>\n", prereq.toString());
}
use of pcgen.core.prereq.Prerequisite in project pcgen by PCGen.
the class PreSkillParserTest method test3.
@Test
public void test3() throws Exception {
PreSkillParser producer = new PreSkillParser();
Prerequisite prereq = producer.parse("SKILL", "3,TYPE.Knowledge=10", 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>\n", prereq.toString());
}
use of pcgen.core.prereq.Prerequisite in project pcgen by PCGen.
the class PreSkillParserTest method testTypeEquals.
@Test
public void testTypeEquals() throws Exception {
PreSkillParser producer = new PreSkillParser();
Prerequisite prereq = producer.parse("SKILL", "3,TYPE=Knowledge=10", 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>\n", prereq.toString());
}
use of pcgen.core.prereq.Prerequisite 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 pcgen.core.prereq.Prerequisite 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());
}
Aggregations