use of plugin.pretokens.parser.PreMoveParser in project pcgen by PCGen.
the class PreMoveRoundRobin method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
TokenRegistration.register(new PreMoveParser());
TokenRegistration.register(new PreMoveWriter());
}
use of plugin.pretokens.parser.PreMoveParser in project pcgen by PCGen.
the class PreMoveParserTest method testFly1.
/**
* @throws Exception
*/
@Test
public void testFly1() throws Exception {
PreMoveParser parser = new PreMoveParser();
Prerequisite prereq = parser.parse("MOVE", "1,Fly=1", false, false);
assertEquals("<prereq kind=\"move\" key=\"Fly\" operator=\"GTEQ\" operand=\"1\" >\n</prereq>\n", prereq.toString());
}
use of plugin.pretokens.parser.PreMoveParser in project pcgen by PCGen.
the class PreMoveParserTest method testNotFlyAndWalk.
/**
* @throws Exception
*/
@Test
public void testNotFlyAndWalk() throws Exception {
PreMoveParser parser = new PreMoveParser();
Prerequisite prereq = parser.parse("MOVE", "1,Walk=30,Fly=20", true, false);
assertEquals("<prereq operator=\"LT\" operand=\"1\" >\n" + "<prereq kind=\"move\" count-multiples=\"true\" key=\"Walk\" operator=\"GTEQ\" operand=\"30\" >\n" + "</prereq>\n" + "<prereq kind=\"move\" count-multiples=\"true\" key=\"Fly\" operator=\"GTEQ\" operand=\"20\" >\n" + "</prereq>\n" + "</prereq>\n", prereq.toString());
}
use of plugin.pretokens.parser.PreMoveParser in project pcgen by PCGen.
the class PreMoveParserTest method testNotFly1.
/**
* @throws Exception
*/
@Test
public void testNotFly1() throws Exception {
PreMoveParser parser = new PreMoveParser();
Prerequisite prereq = parser.parse("MOVE", "1,Fly=1", true, false);
assertEquals("<prereq kind=\"move\" key=\"Fly\" operator=\"LT\" operand=\"1\" >\n</prereq>\n", prereq.toString());
}
use of plugin.pretokens.parser.PreMoveParser in project pcgen by PCGen.
the class PreMoveParserTest method testFlyAndWalk.
/**
* @throws Exception
*/
@Test
public void testFlyAndWalk() throws Exception {
PreMoveParser parser = new PreMoveParser();
Prerequisite prereq = parser.parse("MOVE", "1,Walk=30,Fly=20", false, false);
assertEquals("<prereq operator=\"GTEQ\" operand=\"1\" >\n" + "<prereq kind=\"move\" count-multiples=\"true\" key=\"Walk\" operator=\"GTEQ\" operand=\"30\" >\n" + "</prereq>\n" + "<prereq kind=\"move\" count-multiples=\"true\" key=\"Fly\" operator=\"GTEQ\" operand=\"20\" >\n" + "</prereq>\n" + "</prereq>\n", prereq.toString());
}
Aggregations