use of pcgen.cdom.content.HitDie in project pcgen by PCGen.
the class HDTokenTest method testUnparseLegal.
@Test
public void testUnparseLegal() throws PersistenceLayerException {
primaryProf.put(ObjectKey.LEVEL_HITDIE, new HitDie(1));
expectSingle(getToken().unparse(primaryContext, primaryProf), "1");
}
use of pcgen.cdom.content.HitDie in project pcgen by PCGen.
the class HDTokenTest method testUnparseZero.
@Test
public void testUnparseZero() throws PersistenceLayerException {
try {
primaryProf.put(ObjectKey.LEVEL_HITDIE, new HitDie(0));
assertBadUnparse();
} catch (IllegalArgumentException e) {
// Good here too :)
}
}
use of pcgen.cdom.content.HitDie in project pcgen by PCGen.
the class HDTokenTest method testUnparseNegativeLevel.
@Test
public void testUnparseNegativeLevel() throws PersistenceLayerException {
try {
primaryProf.put(ObjectKey.LEVEL_HITDIE, new HitDie(-1));
assertBadUnparse();
} catch (IllegalArgumentException e) {
// Good here too :)
}
}
use of pcgen.cdom.content.HitDie in project pcgen by PCGen.
the class HitDieTokenTest method testUnparseZeroSteps.
@Test
public void testUnparseZeroSteps() throws PersistenceLayerException {
try {
primaryProf.put(ObjectKey.HITDIE, new HitDieStep(0, new HitDie(12)));
assertBadUnparse();
} catch (IllegalArgumentException e) {
// Good here too :)
}
}
use of pcgen.cdom.content.HitDie in project pcgen by PCGen.
the class HitDieTokenTest method testUnparseNegativeLevel.
@Test
public void testUnparseNegativeLevel() throws PersistenceLayerException {
try {
primaryProf1.put(ObjectKey.HITDIE, new HitDieLock(new HitDie(-1)));
assertBadUnparse();
} catch (IllegalArgumentException e) {
// Good here too :)
}
}
Aggregations