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

Method testExtraVariables

code/src/test/pcgen/cdom/helper/AspectTest.java:176–195  ·  view source on GitHub ↗

Test having extra variables present

()

Source from the content-addressed store, hash-verified

174 * Test having extra variables present
175 */
176 @Test
177 public void testExtraVariables()
178 {
179 final Ability pobj =
180 TestHelper.makeAbility("dummy", BuildUtilities.getFeatCat(), "Foo");
181 Globals.getContext().unconditionallyProcess(pobj, "CHOOSE", "LANG|ALL");
182 Globals.getContext().unconditionallyProcess(pobj, "MULT", "YES");
183 Globals.getContext().getReferenceContext().constructCDOMObject(Language.class, "Foo");
184
185 final Aspect aspect = new Aspect(ASPECT_NAME, "Testing");
186 aspect.addVariable("%LIST");
187 PlayerCharacter pc = getCharacter();
188 assertEquals("Testing", aspect.getAspectText(pc,
189 buildMap(pobj, BuildUtilities.getFeatCat(), Nature.NORMAL)));
190
191 AbstractCharacterTestCase.applyAbility(pc, BuildUtilities.getFeatCat(), pobj,
192 "Foo");
193 assertEquals("Testing", aspect.getAspectText(pc,
194 buildMap(pobj, BuildUtilities.getFeatCat(), Nature.NORMAL)));
195 }
196
197 /**
198 * Test complex replacements.

Callers

nothing calls this directly

Calls 11

makeAbilityMethod · 0.95
getFeatCatMethod · 0.95
getContextMethod · 0.95
addVariableMethod · 0.95
getAspectTextMethod · 0.95
buildMapMethod · 0.95
applyAbilityMethod · 0.95
constructCDOMObjectMethod · 0.80
getReferenceContextMethod · 0.65
getCharacterMethod · 0.45

Tested by

no test coverage detected