Crossfire JXClient, Trunk
Public Member Functions | Static Private Member Functions | List of all members
com.realtime.crossfire.jxclient.commands.CommandExpanderTest Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.commands.CommandExpanderTest:
Collaboration graph

Public Member Functions

void testExpandAllArguments ()
 
void testExpandArguments ()
 
void testExpandCaseInsensitiveCommandNames ()
 
void testExpandIgnoreEmpty ()
 
void testExpandIgnoreWhitespace ()
 
void testExpandMultiple ()
 
void testExpandPredefined ()
 
void testExpandSingle ()
 

Static Private Member Functions

static void check (@NotNull final CharSequence command, @NotNull final Commands commands, @NotNull final CommandExec... commandList)
 

Detailed Description

Regression test for CommandExpander.

Author
Andreas Kirschbaum

Definition at line 184 of file CommandExpanderTest.java.

Member Function Documentation

◆ check()

static void com.realtime.crossfire.jxclient.commands.CommandExpanderTest.check ( @NotNull final CharSequence  command,
@NotNull final Commands  commands,
@NotNull final CommandExec...  commandList 
)
staticprivate

◆ testExpandAllArguments()

void com.realtime.crossfire.jxclient.commands.CommandExpanderTest.testExpandAllArguments ( )

Checks that CommandExpander#expand(CharSequence, Commands) correctly parses commands that consume all remaining arguments.

Definition at line 288 of file CommandExpanderTest.java.

References com.realtime.crossfire.jxclient.commands.Commands.addCommand(), and com.realtime.crossfire.jxclient.commands.CommandExpanderTest.check().

Here is the call graph for this function:

◆ testExpandArguments()

void com.realtime.crossfire.jxclient.commands.CommandExpanderTest.testExpandArguments ( )

Checks that CommandExpander#expand(CharSequence, Commands) correctly parses command arguments.

Definition at line 253 of file CommandExpanderTest.java.

References com.realtime.crossfire.jxclient.commands.Commands.addCommand(), and com.realtime.crossfire.jxclient.commands.CommandExpanderTest.check().

Here is the call graph for this function:

◆ testExpandCaseInsensitiveCommandNames()

void com.realtime.crossfire.jxclient.commands.CommandExpanderTest.testExpandCaseInsensitiveCommandNames ( )

Checks that CommandExpander#expand(CharSequence, Commands) matches command names case-insensitive. This is what the server does, too.

Definition at line 272 of file CommandExpanderTest.java.

References com.realtime.crossfire.jxclient.commands.Commands.addCommand(), and com.realtime.crossfire.jxclient.commands.CommandExpanderTest.check().

Here is the call graph for this function:

◆ testExpandIgnoreEmpty()

void com.realtime.crossfire.jxclient.commands.CommandExpanderTest.testExpandIgnoreEmpty ( )

Checks that CommandExpander#expand(CharSequence, Commands) ignores empty commands.

Definition at line 224 of file CommandExpanderTest.java.

References com.realtime.crossfire.jxclient.commands.CommandExpanderTest.check().

Here is the call graph for this function:

◆ testExpandIgnoreWhitespace()

void com.realtime.crossfire.jxclient.commands.CommandExpanderTest.testExpandIgnoreWhitespace ( )

Checks that CommandExpander#expand(CharSequence, Commands) allows whitespace before or after the command separator.

Definition at line 211 of file CommandExpanderTest.java.

References com.realtime.crossfire.jxclient.commands.CommandExpanderTest.check().

Here is the call graph for this function:

◆ testExpandMultiple()

void com.realtime.crossfire.jxclient.commands.CommandExpanderTest.testExpandMultiple ( )

Checks that CommandExpander#expand(CharSequence, Commands) works as expected.

Definition at line 201 of file CommandExpanderTest.java.

References com.realtime.crossfire.jxclient.commands.CommandExpanderTest.check().

Here is the call graph for this function:

◆ testExpandPredefined()

void com.realtime.crossfire.jxclient.commands.CommandExpanderTest.testExpandPredefined ( )

◆ testExpandSingle()

void com.realtime.crossfire.jxclient.commands.CommandExpanderTest.testExpandSingle ( )

Checks that CommandExpander#expand(CharSequence, Commands) works as expected.

Definition at line 191 of file CommandExpanderTest.java.

References com.realtime.crossfire.jxclient.commands.CommandExpanderTest.check().

Here is the call graph for this function:

The documentation for this class was generated from the following file: