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

Method evaluateToken

code/src/test/pcgen/util/TestHelper.java:593–604  ·  view source on GitHub ↗

Evaluate a token, used in several "export" tests. By default, the token encoding is ignored. If encoded value is required, use @see pcgen.io.FileAccess#setCurrentOutputFilter(java.lang.String) before calling this static method. @param token the token to evaluate (e.g., any token from @see plugin.ex

(String token, PlayerCharacter pc)

Source from the content-addressed store, hash-verified

591 * @throws IOException Signals that an I/O exception has occurred.
592 */
593 public static String evaluateToken(String token, PlayerCharacter pc)
594 throws IOException
595 {
596 StringWriter retWriter = new StringWriter();
597 try (BufferedWriter bufWriter = new BufferedWriter(retWriter))
598 {
599 ExportHandler export = ExportHandler.createExportHandler(new File(""));
600 export.replaceTokenSkipMath(pc, token, bufWriter);
601 }
602
603 return retWriter.toString();
604 }
605}

Callers 10

testNonEncodedURIMethod · 0.80
testBioExportMethod · 0.80
testFieldChoiceMethod · 0.80
testVisibilityMethod · 0.80
testWpnLoopMethod · 0.80
testEqtypeLoopMethod · 0.80
testJepIifMethod · 0.80
testForMethod · 0.80
testForNoMoreItemsMethod · 0.80
testExpressionOutputMethod · 0.80

Calls 3

createExportHandlerMethod · 0.95
replaceTokenSkipMathMethod · 0.95
toStringMethod · 0.65

Tested by

no test coverage detected