|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.functest.framework.util.text.TextKit
public class TextKit
A class that handles text assertions and searches.
Constructor Summary | |
---|---|
TextKit()
|
Method Summary | |
---|---|
static void |
assertContainsTextSequence(String srcText,
String[] expectedTextSequence)
Returns true if the given expectedTextSequence of Strings all occur within the given srcText in the order given. |
static String |
collapseWhitespace(String text)
Collapses repeated white space ( \n\t) in the string into a single space. |
static boolean |
containsCollapseWhiteSpace(String needle,
String haystack)
Tests if two strings are equal after repeated white space sequences are collapased into single spaces. |
static boolean |
containsTextSequence(String srcText,
String[] expectedTextSequence)
Returns true if the 'srcText' contains the given sequence of text. |
static boolean |
equalsCollapseWhiteSpace(String string1,
String string2)
Tests if two strings are equal after repeated white space sequences are collapased into single spaces. |
static int |
getNumOccurences(String text,
String subString)
Counts the number of times that subString occurs within the given text. |
static String |
htmlEncode(String text)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextKit()
Method Detail |
---|
public static String collapseWhitespace(String text)
text
- the text to collapse the white space in
public static boolean equalsCollapseWhiteSpace(String string1, String string2)
string1
- the first string to teststring2
- the second string to test
collapseWhitespace(java.lang.String)
public static boolean containsCollapseWhiteSpace(String needle, String haystack)
needle
- the first string to testhaystack
- the second string to test
collapseWhitespace(java.lang.String)
public static int getNumOccurences(String text, String subString)
text
- The text to search.subString
- The subString that we are searching for.
public static boolean containsTextSequence(String srcText, String[] expectedTextSequence)
srcText
- the text to searchexpectedTextSequence
- the expected text sequence
public static void assertContainsTextSequence(String srcText, String[] expectedTextSequence)
srcText
- the text to searchexpectedTextSequence
- the expected text sequencepublic static String htmlEncode(String text)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |