use of plugin.pretokens.parser.PreLanguageParser in project pcgen by PCGen.
the class PreLanguageParserTest method testNot1LanguageOf2.
/**
* @throws Exception
*/
@Test
public void testNot1LanguageOf2() throws Exception {
PreLanguageParser parser = new PreLanguageParser();
Prerequisite prereq = parser.parse("LANG", "1,Dwarven,Elven", true, false);
System.out.println(prereq);
assertEquals("<prereq operator=\"LT\" operand=\"1\" >\n" + "<prereq kind=\"lang\" count-multiples=\"true\" key=\"Dwarven\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "<prereq kind=\"lang\" count-multiples=\"true\" key=\"Elven\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "</prereq>\n", prereq.toString());
}
use of plugin.pretokens.parser.PreLanguageParser in project pcgen by PCGen.
the class PreLanguageParserTest method testNot2LanguageOfAny.
/**
* @throws Exception
*/
@Test
public void testNot2LanguageOfAny() throws Exception {
PreLanguageParser parser = new PreLanguageParser();
Prerequisite prereq = parser.parse("LANG", "2,ANY", true, false);
System.out.println(prereq);
assertEquals("<prereq kind=\"lang\" count-multiples=\"true\" key=\"ANY\" operator=\"LT\" operand=\"2\" >\n" + "</prereq>\n", prereq.toString());
}
use of plugin.pretokens.parser.PreLanguageParser in project pcgen by PCGen.
the class PreLanguageRoundRobin method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
TokenRegistration.register(new PreLanguageParser());
TokenRegistration.register(new PreLanguageWriter());
}
use of plugin.pretokens.parser.PreLanguageParser in project pcgen by PCGen.
the class PreLanguageParserTest method test1LanguageOf2.
/**
* @throws Exception
*/
@Test
public void test1LanguageOf2() throws Exception {
PreLanguageParser parser = new PreLanguageParser();
Prerequisite prereq = parser.parse("LANG", "1,Dwarven,Elven", false, false);
System.out.println(prereq);
assertEquals("<prereq operator=\"GTEQ\" operand=\"1\" >\n" + "<prereq kind=\"lang\" count-multiples=\"true\" key=\"Dwarven\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "<prereq kind=\"lang\" count-multiples=\"true\" key=\"Elven\" operator=\"GTEQ\" operand=\"1\" >\n" + "</prereq>\n" + "</prereq>\n", prereq.toString());
}
use of plugin.pretokens.parser.PreLanguageParser in project pcgen by PCGen.
the class PreLanguageParserTest method test2LanguageOfAny.
/**
* @throws Exception
*/
@Test
public void test2LanguageOfAny() throws Exception {
PreLanguageParser parser = new PreLanguageParser();
Prerequisite prereq = parser.parse("LANG", "2,ANY", false, false);
System.out.println(prereq);
assertEquals("<prereq kind=\"lang\" count-multiples=\"true\" key=\"ANY\" operator=\"GTEQ\" operand=\"2\" >\n" + "</prereq>\n", prereq.toString());
}
Aggregations