MCPcopy Create free account
hub / github.com/PCGen/pcgen / testLevelsPerFeatMonster

Method testLevelsPerFeatMonster

code/src/test/pcgen/core/PCClassTest.java:935–950  ·  view source on GitHub ↗

Test the function of the LEVELSPERFEAT in setLevel() Monster class with a levels per feat setting.

()

Source from the content-addressed store, hash-verified

933 * Monster class with a levels per feat setting.
934 */
935 @Test
936 void testLevelsPerFeatMonster()
937 {
938 finishLoad();
939 PlayerCharacter pc = getCharacter();
940 nymphClass.put(IntegerKey.LEVELS_PER_FEAT, 4);
941 List<BonusObj> bonusList = nymphClass.getRawBonusList(pc);
942 assertEquals(0, bonusList.size(), "Bonus list empty");
943 pc.setRace(nymphRace);
944 bonusList = nymphClass.getRawBonusList(pc);
945 assertEquals(0, bonusList.size(), "Bonus list empty");
946
947 pc.incrementClassLevel(1, nymphClass);
948 bonusList = pc.getClassKeyed(nymphClass.getKeyName()).getRawBonusList(pc);
949 assertEquals(0, bonusList.size(), "No bonus due to the LEVELSPERFEAT");
950 }
951
952 /**
953 * Test the function of the LEVELSPERFEAT in setLevel()

Callers

nothing calls this directly

Calls 9

setRaceMethod · 0.95
incrementClassLevelMethod · 0.95
getClassKeyedMethod · 0.95
putMethod · 0.65
sizeMethod · 0.65
getKeyNameMethod · 0.65
finishLoadMethod · 0.45
getCharacterMethod · 0.45
getRawBonusListMethod · 0.45

Tested by

no test coverage detected