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

Method testNonMagic

code/src/test/plugin/exporttokens/ACTokenTest.java:172–191  ·  view source on GitHub ↗

Test the character's AC calcs with armor with no equip mods applied.

()

Source from the content-addressed store, hash-verified

170 * Test the character's AC calcs with armor with no equip mods applied.
171 */
172 @Test
173 public void testNonMagic()
174 {
175 PlayerCharacter character = getCharacter();
176 EquipSet es =
177 new EquipSet("0.1.2", "Chain Shirt", chainShirt.getName(),
178 chainShirt);
179 character.addEquipSet(es);
180 character.setCalcEquipmentList();
181 character.calcActiveBonuses();
182
183 assertEquals("2", new ACToken().getToken(
184 "AC.Ability", getCharacter(), null), "Ability AC normal armor");
185
186 assertEquals("4", new ACToken().getToken(
187 "AC.Armor", getCharacter(), null), "Armor AC with normal armor");
188
189 assertEquals("16", new ACToken()
190 .getToken("AC.Total", getCharacter(), null), "Total AC with normal armor");
191 }
192
193 /**
194 * Test the character's AC calcs with armor with equipmods applied, including magic.

Callers

nothing calls this directly

Calls 6

addEquipSetMethod · 0.95
setCalcEquipmentListMethod · 0.95
calcActiveBonusesMethod · 0.95
getNameMethod · 0.65
getCharacterMethod · 0.45
getTokenMethod · 0.45

Tested by

no test coverage detected