PSEK-Fitnesse-Fixtures  2.3.x (JDK11)
nl.psek.fitnesse.fixtures.general.string.StringFixture Class Reference

A fixture that can be used to verify and manipulate strings. More...

Public Member Functions

 StringFixture (String value)
 Constructs a new String Fixture with the initial value set. More...
 
void appendValue (String value)
 appends a string. More...
 
boolean clearBuffer ()
 Clears the buffer completely. More...
 
String getSubstringWithRegex (String regex)
 Gets substring with regex. More...
 
void replaceAll (String pattern, String replacement)
 Replaces the pattern with the replacement in the buffer. More...
 
String result ()
 Returns the value. More...
 
String resultToLowerCase ()
 convert a string to lowercase More...
 
String resultToUpperCase ()
 convert a string to uppercase More...
 
String substring (String start, String end)
 Returns a new string that is a substring of this string. More...
 
String substringFrom (String start)
 Substring from string. More...
 
String substringTo (String end)
 Substring to string. More...
 
boolean verifyStringContains (String pattern)
 Verify string contains boolean. More...
 
boolean verifyStringDoesNotContain (String pattern)
 Verify string does not contain boolean. More...
 

Private Attributes

StringBuilder builder = new StringBuilder()
 

Detailed Description

A fixture that can be used to verify and manipulate strings.

Author
Ronald Mathies

Definition at line 13 of file StringFixture.java.

Constructor & Destructor Documentation

◆ StringFixture()

nl.psek.fitnesse.fixtures.general.string.StringFixture.StringFixture ( String  value)

Constructs a new String Fixture with the initial value set.

Parameters
valuethe initial value to work with.

Definition at line 22 of file StringFixture.java.

Member Function Documentation

◆ appendValue()

void nl.psek.fitnesse.fixtures.general.string.StringFixture.appendValue ( String  value)

appends a string.

Parameters
valuethe value

Definition at line 31 of file StringFixture.java.

◆ clearBuffer()

boolean nl.psek.fitnesse.fixtures.general.string.StringFixture.clearBuffer ( )

Clears the buffer completely.

Returns
the boolean

Definition at line 42 of file StringFixture.java.

◆ getSubstringWithRegex()

String nl.psek.fitnesse.fixtures.general.string.StringFixture.getSubstringWithRegex ( String  regex)

Gets substring with regex.

Parameters
regexthe regex
Returns
the substring with regex

Definition at line 113 of file StringFixture.java.

◆ replaceAll()

void nl.psek.fitnesse.fixtures.general.string.StringFixture.replaceAll ( String  pattern,
String  replacement 
)

Replaces the pattern with the replacement in the buffer.

Parameters
patternthe pattern to look for.
replacementthe replacement value.

Definition at line 62 of file StringFixture.java.

◆ result()

String nl.psek.fitnesse.fixtures.general.string.StringFixture.result ( )

Returns the value.

Returns
the string

Definition at line 52 of file StringFixture.java.

◆ resultToLowerCase()

String nl.psek.fitnesse.fixtures.general.string.StringFixture.resultToLowerCase ( )

convert a string to lowercase

Returns
lowercase string

Definition at line 93 of file StringFixture.java.

◆ resultToUpperCase()

String nl.psek.fitnesse.fixtures.general.string.StringFixture.resultToUpperCase ( )

convert a string to uppercase

Returns
uppercase string

Definition at line 102 of file StringFixture.java.

◆ substring()

String nl.psek.fitnesse.fixtures.general.string.StringFixture.substring ( String  start,
String  end 
)

Returns a new string that is a substring of this string.

Parameters
startthe start index.
endthe end index.
Returns
the string

Definition at line 124 of file StringFixture.java.

◆ substringFrom()

String nl.psek.fitnesse.fixtures.general.string.StringFixture.substringFrom ( String  start)

Substring from string.

Parameters
startthe start
Returns
the string

Definition at line 163 of file StringFixture.java.

◆ substringTo()

String nl.psek.fitnesse.fixtures.general.string.StringFixture.substringTo ( String  end)

Substring to string.

Parameters
endthe end
Returns
the string

Definition at line 174 of file StringFixture.java.

◆ verifyStringContains()

boolean nl.psek.fitnesse.fixtures.general.string.StringFixture.verifyStringContains ( String  pattern)

Verify string contains boolean.

Parameters
patternthe pattern
Returns
the boolean

Definition at line 73 of file StringFixture.java.

◆ verifyStringDoesNotContain()

boolean nl.psek.fitnesse.fixtures.general.string.StringFixture.verifyStringDoesNotContain ( String  pattern)

Verify string does not contain boolean.

Parameters
patternthe pattern
Returns
the boolean

Definition at line 84 of file StringFixture.java.

Member Data Documentation

◆ builder

StringBuilder nl.psek.fitnesse.fixtures.general.string.StringFixture.builder = new StringBuilder()
private

Definition at line 15 of file StringFixture.java.


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