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

Method testWpnLoop

code/src/test/pcgen/io/ExportHandlerTest.java:205–220  ·  view source on GitHub ↗

Test the behavior of the weapon loop. @throws IOException Signals that an I/O exception has occurred.

()

Source from the content-addressed store, hash-verified

203 * @throws IOException Signals that an I/O exception has occurred.
204 */
205 @Test
206 public void testWpnLoop() throws IOException
207 {
208 PlayerCharacter character = getCharacter();
209
210 // Test each token for old and new syntax processing.
211
212 assertEquals("****", evaluateToken(
213 "FOR.0,100,1,**\\WEAPON.%.NAME\\**,NONE,NONE,1", character), "New format SKILL Token");
214 // Now assign a weapon
215 character.addEquipment(weapon);
216 EquipSet es = new EquipSet("1", "Default", "", weapon);
217 character.addEquipSet(es);
218 assertEquals("**TestWpn**", evaluateToken(
219 "FOR.0,100,1,**\\WEAPON.%.NAME\\**,NONE,NONE,1", character), "New format SKILL Token");
220 }
221
222 /**
223 * Test the export of equipment using the eqtype token in a loop.

Callers

nothing calls this directly

Calls 4

addEquipmentMethod · 0.95
addEquipSetMethod · 0.95
evaluateTokenMethod · 0.80
getCharacterMethod · 0.45

Tested by

no test coverage detected