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

Method testMagic

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

Test the character's AC calcs with armor with equipmods applied, including magic.

()

Source from the content-addressed store, hash-verified

194 * Test the character's AC calcs with armor with equipmods applied, including magic.
195 */
196 @Test
197 public void testMagic()
198 {
199 PlayerCharacter character = getCharacter();
200 chainShirt.addEqModifiers("MWORKA.PLUS1A", true);
201 EquipSet es =
202 new EquipSet("0.1.2", "Chain Shirt", chainShirt.getName(),
203 chainShirt);
204 character.addEquipSet(es);
205 character.setCalcEquipmentList();
206 character.calcActiveBonuses();
207
208 assertEquals("2", new ACToken().getToken(
209 "AC.Ability", getCharacter(), null), "Ability AC magic armor");
210
211 assertEquals("5", new ACToken().getToken(
212 "AC.Armor", getCharacter(), null), "Armor AC with magic armor");
213
214 assertEquals("17", new ACToken().getToken(
215 "AC.Total", getCharacter(), null), "Total AC with magic armor");
216 }
217
218}

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected