use of plugin.pretokens.parser.PreClassParser in project pcgen by PCGen.
the class PreClassTest method testInvalidSeparators.
/**
* Test that an error is produced if separators are incorrect
* @throws Exception
*/
@Test
public void testInvalidSeparators() throws Exception {
try {
PreClassParser parser = new PreClassParser();
Prerequisite prereq = parser.parse("class", "1,,Monk=1", false, false);
fail("Should have thrown a PersistenceLayerException.");
} catch (PersistenceLayerException e) {
// Ignore, this is the expected result.
}
}
use of plugin.pretokens.parser.PreClassParser in project pcgen by PCGen.
the class PreClassTest method testNoClassLevels.
@Test
public void testNoClassLevels() throws Exception {
PreClassParser parser = new PreClassParser();
Prerequisite prereq = parser.parse("class", "1,Monk=1", true, false);
assertEquals("<prereq kind=\"class\" key=\"Monk\" operator=\"LT\" operand=\"1\" >\n" + "</prereq>\n", prereq.toString());
}
use of plugin.pretokens.parser.PreClassParser in project pcgen by PCGen.
the class AbilityLstTest method setUp.
@Override
public void setUp() throws PersistenceLayerException, URISyntaxException {
super.setUp();
TokenRegistration.register(new PreRaceParser());
TokenRegistration.register(new PreRaceWriter());
TokenRegistration.register(new PreLevelParser());
TokenRegistration.register(new PreLevelWriter());
TokenRegistration.register(new PreClassParser());
TokenRegistration.register(new PreClassWriter());
}
use of plugin.pretokens.parser.PreClassParser in project pcgen by PCGen.
the class ClassesIntegrationTest method ltClassSetUp.
@BeforeClass
public static final void ltClassSetUp() throws PersistenceLayerException {
TokenRegistration.register(new PreClassParser());
classSetUpFired = true;
}
use of plugin.pretokens.parser.PreClassParser in project pcgen by PCGen.
the class AbstractTextPropertyTokenTestCase method setUp.
@Override
@Before
public void setUp() throws PersistenceLayerException, URISyntaxException {
super.setUp();
TokenRegistration.register(new PreLevelParser());
TokenRegistration.register(new PreClassParser());
TokenRegistration.register(new PreLevelWriter());
TokenRegistration.register(new PreClassWriter());
}
Aggregations