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

Method testEqtypeLoop

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

Test the export of equipment using the eqtype token in a loop. @throws IOException Signals that an I/O exception has occurred.

()

Source from the content-addressed store, hash-verified

225 * @throws IOException Signals that an I/O exception has occurred.
226 */
227 @Test
228 public void testEqtypeLoop() throws IOException
229 {
230 PlayerCharacter character = getCharacter();
231 final String gemLoop =
232 "FOR.0,COUNT[EQTYPE.Gem],1,\\EQTYPE.Gem.%.NAME\\: \\EQTYPE.Gem.%.QTY\\, ,<br/>,1";
233
234 assertEquals("",
235 evaluateToken(gemLoop, character), "Gem Loop - no gems"
236 );
237
238 // Now assign a gem
239 character.addEquipment(gem);
240 EquipSet es = new EquipSet("1", "Default", "", gem);
241 character.addEquipSet(es);
242 character.setDirty(true);
243 assertEquals(" TestGem: 1<br/>", evaluateToken(
244 gemLoop, character), "Gem loop - 1 gem");
245 }
246
247 @Test
248 public void testJepIif() throws IOException

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected