Search in sources :

Example 31 with ExportHandler

use of pcgen.io.ExportHandler in project pcgen by PCGen.

the class AbilityTokenTest method testAssociated.

/**
	 * Tests the associated subtoken of ABILITY.
	 */
public void testAssociated() {
    AbilityToken tok = new AbilityToken();
    ExportHandler eh = new ExportHandler(null);
    PlayerCharacter character = getCharacter();
    assertEquals("", tok.getToken("ABILITY.FEAT.0.ASSOCIATED", character, eh));
    assertEquals("Bluff,Listen", tok.getToken("ABILITY.FEAT.1.ASSOCIATED", character, eh));
    assertEquals("Bluff", tok.getToken("ABILITY.FEAT.1.ASSOCIATED.0", character, eh));
    assertEquals("Listen", tok.getToken("ABILITY.FEAT.1.ASSOCIATED.1", character, eh));
}
Also used : PlayerCharacter(pcgen.core.PlayerCharacter) ExportHandler(pcgen.io.ExportHandler)

Aggregations

ExportHandler (pcgen.io.ExportHandler)31 PlayerCharacter (pcgen.core.PlayerCharacter)24 File (java.io.File)7 BufferedWriter (java.io.BufferedWriter)6 StringWriter (java.io.StringWriter)4 IOException (java.io.IOException)3 TextToken (plugin.exporttokens.TextToken)3 OutputStreamWriter (java.io.OutputStreamWriter)2 Test (org.junit.Test)2 FileOutputStream (java.io.FileOutputStream)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 CharacterFacade (pcgen.facade.core.CharacterFacade)1 ExportException (pcgen.io.ExportException)1 PCGFile (pcgen.io.PCGFile)1