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

Method testPartyFor

code/src/test/pcgen/io/ExportHandlerTest.java:430–448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

428 }
429
430 @Test
431 public void testPartyFor() throws IOException
432 {
433 String outputToken =
434 " <combatants>\n"
435 + "|FOR.0,50,1,\n"
436 + " <name>\\\\%.NAME\\\\</name>\n"
437 + " <skills>\\\\%.FOR.0,COUNT[SKILLS],1,\\SKILL.%\\: \\SKILL.%.TOTAL.SIGN\\, ,; ,1\\\\</skills>\n"
438 + ",<combatant>,</combatant>,1|\n" + " </combatants>";
439 List<PlayerCharacter> pcs = new ArrayList<>();
440 pcs.add(getCharacter());
441 String result = evaluatePartyToken(outputToken, pcs).trim();
442 assertEquals("<combatants>"
443 + System.getProperty("line.separator")
444 + "<combatant> <name></name> <skills> Balance: +9; KNOWLEDGE (ARCANA): +11; "
445 + "KNOWLEDGE (RELIGION): +8; Tumble: +10; </skills></combatant> </combatants>",
446 result, "Party skills output"
447 );
448 }
449
450 private static String evaluatePartyToken(String token, List<PlayerCharacter> pcs)
451 throws IOException

Callers

nothing calls this directly

Calls 5

evaluatePartyTokenMethod · 0.95
trimMethod · 0.80
addMethod · 0.65
getCharacterMethod · 0.45
getPropertyMethod · 0.45

Tested by

no test coverage detected