Gridarta Editor
net.sf.gridarta.utils.StringUtilsTest Class Reference
+ Collaboration diagram for net.sf.gridarta.utils.StringUtilsTest:

Public Member Functions

void testDiffTextString ()
 
void testEnsureTrailingNewline ()
 
void testRemoveAttribute ()
 
void testRemoveTrailingWhitespace ()
 
void testRemoveTrailingWhitespaceFromLines ()
 

Static Private Member Functions

static void testDiffTextString (@NotNull final CharSequence base, @NotNull final String str, @Nullable final String expectedFalse, @Nullable final String expectedTrue)
 
static void testEnsureTrailingNewline (@NotNull final String input, @NotNull final String output)
 
static void testGetAttribute (@NotNull final CharSequence attributes, @NotNull final String attributeName, @Nullable final String expectedAttributeValue)
 
static void testRemoveTrailingWhitespace (final CharSequence input, final String output)
 
static void testRemoveTrailingWhitespaceFromLines (@NotNull final CharSequence input, @NotNull final String output)
 

Detailed Description

Test for StringUtils.

Author
Andreas Kirschbaum

Definition at line 32 of file StringUtilsTest.java.

Member Function Documentation

◆ testDiffTextString() [1/2]

void net.sf.gridarta.utils.StringUtilsTest.testDiffTextString ( )

Test case for String, boolean).

Definition at line 104 of file StringUtilsTest.java.

◆ testDiffTextString() [2/2]

static void net.sf.gridarta.utils.StringUtilsTest.testDiffTextString ( @NotNull final CharSequence  base,
@NotNull final String  str,
@Nullable final String  expectedFalse,
@Nullable final String  expectedTrue 
)
staticprivate

Checks two invocations of String, boolean).

Parameters
basethe 'base' parameter to use
strthe 'str' parameter to use
expectedFalsethe expected return value if 'ignoreValues' is
false
expectedTruethe expected return value if 'ignoreValues' is
true

Definition at line 128 of file StringUtilsTest.java.

References net.sf.gridarta.utils.StringUtils.diffTextString().

+ Here is the call graph for this function:

◆ testEnsureTrailingNewline() [1/2]

void net.sf.gridarta.utils.StringUtilsTest.testEnsureTrailingNewline ( )

Test case for StringUtils#ensureTrailingNewline(String).

Definition at line 82 of file StringUtilsTest.java.

◆ testEnsureTrailingNewline() [2/2]

static void net.sf.gridarta.utils.StringUtilsTest.testEnsureTrailingNewline ( @NotNull final String  input,
@NotNull final String  output 
)
staticprivate

Checks one invocation of StringUtils#ensureTrailingNewline(String).

Parameters
inputthe input string
outputthe expected output string

Definition at line 95 of file StringUtilsTest.java.

References net.sf.gridarta.utils.StringUtils.ensureTrailingNewline().

+ Here is the call graph for this function:

◆ testGetAttribute()

static void net.sf.gridarta.utils.StringUtilsTest.testGetAttribute ( @NotNull final CharSequence  attributes,
@NotNull final String  attributeName,
@Nullable final String  expectedAttributeValue 
)
staticprivate

Checks that StringUtils#getAttribute(CharSequence, String) does work.

Parameters
attributesthe attributes to search
attributeNamethe attribute name to search for
expectedAttributeValuethe found attribute value

Definition at line 155 of file StringUtilsTest.java.

References net.sf.gridarta.utils.StringUtils.getAttribute().

+ Here is the call graph for this function:

◆ testRemoveAttribute()

void net.sf.gridarta.utils.StringUtilsTest.testRemoveAttribute ( )

Test case for StringUtils#getAttribute(CharSequence, String).

Definition at line 137 of file StringUtilsTest.java.

◆ testRemoveTrailingWhitespace() [1/2]

void net.sf.gridarta.utils.StringUtilsTest.testRemoveTrailingWhitespace ( )

◆ testRemoveTrailingWhitespace() [2/2]

static void net.sf.gridarta.utils.StringUtilsTest.testRemoveTrailingWhitespace ( final CharSequence  input,
final String  output 
)
staticprivate

Checks one invocation of StringUtils#removeTrailingWhitespace(CharSequence).

Parameters
inputthe input string
outputthe expected output string

Definition at line 50 of file StringUtilsTest.java.

References net.sf.gridarta.utils.StringUtils.removeTrailingWhitespace().

+ Here is the call graph for this function:

◆ testRemoveTrailingWhitespaceFromLines() [1/2]

void net.sf.gridarta.utils.StringUtilsTest.testRemoveTrailingWhitespaceFromLines ( )

◆ testRemoveTrailingWhitespaceFromLines() [2/2]

static void net.sf.gridarta.utils.StringUtilsTest.testRemoveTrailingWhitespaceFromLines ( @NotNull final CharSequence  input,
@NotNull final String  output 
)
staticprivate

Checks one invocation of StringUtils#removeTrailingWhitespaceFromLines(CharSequence).

Parameters
inputthe input string
outputthe expected output string

Definition at line 74 of file StringUtilsTest.java.

References net.sf.gridarta.utils.StringUtils.removeTrailingWhitespaceFromLines().

+ Here is the call graph for this function:

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