Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.commands.CommandExpanderTest Class Reference

Regression test for CommandExpander. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.commands.CommandExpanderTest:

Public Member Functions

void testExpandAllArguments ()
 Checks that CommandExpander#expand(CharSequence, Commands) correctly parses commands that consume all remaining arguments. More...
 
void testExpandArguments ()
 Checks that CommandExpander#expand(CharSequence, Commands) correctly parses command arguments. More...
 
void testExpandCaseInsensitiveCommandNames ()
 Checks that CommandExpander#expand(CharSequence, Commands) matches command names case-insensitive. More...
 
void testExpandIgnoreEmpty ()
 Checks that CommandExpander#expand(CharSequence, Commands) ignores empty commands. More...
 
void testExpandIgnoreWhitespace ()
 Checks that CommandExpander#expand(CharSequence, Commands) allows whitespace before or after the command separator. More...
 
void testExpandMultiple ()
 Checks that CommandExpander#expand(CharSequence, Commands) works as expected. More...
 
void testExpandPredefined ()
 Checks that CommandExpander#expand(CharSequence, Commands) detects predefined commands. More...
 
void testExpandSingle ()
 Checks that CommandExpander#expand(CharSequence, Commands) works as expected. More...
 

Static Private Member Functions

static void check (@NotNull final CharSequence command, @NotNull final Commands commands, @NotNull final CommandExec... commandList)
 Checks that CommandExpander#expand(CharSequence, Commands) works as expected. More...
 

Detailed Description

Regression test for CommandExpander.

Author
Andreas Kirschbaum

Definition at line 36 of file CommandExpanderTest.java.

Member Function Documentation

◆ check()

◆ 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 140 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 105 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 124 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 76 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 63 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 53 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 43 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: