public class

TextAssertionsImpl

extends AbstractFuncTestUtil
implements TextAssertions FuncTestLogger
java.lang.Object
   ↳ com.atlassian.jira.functest.framework.AbstractFuncTestUtil
     ↳ com.atlassian.jira.functest.framework.assertions.TextAssertionsImpl

Class Overview

An implementation of the TextAssertions

Summary

[Expand]
Inherited Fields
From class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
Public Constructors
TextAssertionsImpl()
TextAssertionsImpl(WebTester tester)
Public Methods
void assertAtLeastOneTextPresent(Locator locator, String option1, String... moreOptions)
Asserts that at least one of the provided text strings is present in the locator.
void assertRegexMatch(Locator locator, String regexPattern)
Synonym for assertRegexMatch(String, String) that calls getText() on the provided locator.
void assertRegexMatch(String srcText, String regexPattern)
This asserets that the regular expression pattern 'regexPattern' has at least one match somewhere inside 'srcText'
void assertRegexNoMatch(Locator locator, String regexPattern)
Synonym for assertRegexNoMatch(String, String) that calls getText() on the provided locator.
void assertRegexNoMatch(String srcText, String regexPattern)
This asserets that the regular expression pattern 'regexPattern' has NO match somewhere inside 'srcText'
void assertTextNotPresent(String srcText, String expectedText)
Asserts that 'expectedText' can NOT be found in 'srcText'.
void assertTextNotPresent(String expectedText)
Asserts that the given text cannot be found in the current page.
void assertTextNotPresent(Locator locator, String expectedText)
Synonym for assertTextNotPresent(String, String) that calls getText() on the provided locator.
void assertTextPresent(String expectedText)
Asserts that 'expectedText' can be found in the current page.
void assertTextPresent(Locator locator, String expectedText)
Synonym for assertTextPresent(String, String) that calls getText() on the provided locator.
void assertTextPresent(String srcText, String expectedText)
Asserts that 'expectedText' can be found in 'srcText'.
void assertTextPresentHtmlEncoded(String expectedText)
Asserts that 'expectedText' can be found in the current page in a "HTML Encoded" form.
void assertTextPresentNumOccurences(Locator locator, String expectedText, int numOccurences)
Synonym for assertTextPresentNumOccurences(String, String, int) that calls getText() on the provided locator.
void assertTextPresentNumOccurences(String expectedText, int numOccurences)
Asserts that 'expectedText' can be found in the current page exactly 'numOccurences' times.
void assertTextPresentNumOccurences(String srcText, String subString, int expectedCount)
Asserts that 'expectedText' can be found in 'srcText' exactly 'numOccurences' times.
void assertTextSequence(Locator locator, String expected1, String... expected2)
Synonym for assertTextSequence(String, String[]) that calls getText() on the provided locator.
void assertTextSequence(String srcText, String expected1, String... expected2)
Asserts that the text sequence 'expectedTextSequence' can be found in 'srcText'
void assertTextSequence(Locator locator, String[] expectedTextSequence)
Synonym for assertTextSequence(String, String[]) that calls getText() on the provided locator.
void assertTextSequence(String srcText, String[] expectedTextSequence)
Asserts that the text sequence 'expectedTextSequence' can be found in 'srcText'
[Expand]
Inherited Methods
From class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
From class java.lang.Object
From interface com.atlassian.jira.functest.framework.assertions.TextAssertions
From interface com.atlassian.jira.testkit.client.log.FuncTestLogger

Public Constructors

public TextAssertionsImpl ()

public TextAssertionsImpl (WebTester tester)

Public Methods

public void assertAtLeastOneTextPresent (Locator locator, String option1, String... moreOptions)

Asserts that at least one of the provided text strings is present in the locator. Will throw an junit.framework.AssertionFailedError if none are present.

Parameters
locator the source of the text
option1 the expected text
moreOptions the expected texts

public void assertRegexMatch (Locator locator, String regexPattern)

Synonym for assertRegexMatch(String, String) that calls getText() on the provided locator.

Parameters
locator the source of the teext
regexPattern the regex pattern

public void assertRegexMatch (String srcText, String regexPattern)

This asserets that the regular expression pattern 'regexPattern' has at least one match somewhere inside 'srcText'

Parameters
srcText the text source to do the matching in
regexPattern the regex pattern

public void assertRegexNoMatch (Locator locator, String regexPattern)

Synonym for assertRegexNoMatch(String, String) that calls getText() on the provided locator.

Parameters
locator the source of the teext
regexPattern the regex pattern

public void assertRegexNoMatch (String srcText, String regexPattern)

This asserets that the regular expression pattern 'regexPattern' has NO match somewhere inside 'srcText'

Parameters
srcText the text source to do the matching in
regexPattern the regex pattern

public void assertTextNotPresent (String srcText, String expectedText)

Asserts that 'expectedText' can NOT be found in 'srcText'.

Parameters
srcText the text to search in
expectedText the expected text

public void assertTextNotPresent (String expectedText)

Asserts that the given text cannot be found in the current page.

Parameters
expectedText the expected text

public void assertTextNotPresent (Locator locator, String expectedText)

Synonym for assertTextNotPresent(String, String) that calls getText() on the provided locator.

Parameters
locator the source of the text
expectedText the expected text

public void assertTextPresent (String expectedText)

Asserts that 'expectedText' can be found in the current page.

Parameters
expectedText the expected text

public void assertTextPresent (Locator locator, String expectedText)

Synonym for assertTextPresent(String, String) that calls getText() on the provided locator.

Parameters
locator the source of the text
expectedText the expected text

public void assertTextPresent (String srcText, String expectedText)

Asserts that 'expectedText' can be found in 'srcText'.

Parameters
srcText the text to search in
expectedText the expected text

public void assertTextPresentHtmlEncoded (String expectedText)

Asserts that 'expectedText' can be found in the current page in a "HTML Encoded" form.

The encoding expects <, >, ", ', and & to be encoded to appropriate HTML encoding.

Parameters
expectedText the expected text

public void assertTextPresentNumOccurences (Locator locator, String expectedText, int numOccurences)

Synonym for assertTextPresentNumOccurences(String, String, int) that calls getText() on the provided locator.

Parameters
locator the source of the text
expectedText the expected text
numOccurences the number of times the expected text should occur; must be greater than 0.

public void assertTextPresentNumOccurences (String expectedText, int numOccurences)

Asserts that 'expectedText' can be found in the current page exactly 'numOccurences' times.

Parameters
expectedText the expected text
numOccurences the number of times the expected text should occur; must be greater than 0.

public void assertTextPresentNumOccurences (String srcText, String subString, int expectedCount)

Asserts that 'expectedText' can be found in 'srcText' exactly 'numOccurences' times.

Parameters
srcText the text to search in
subString the expected text
expectedCount the number of times the expected text should occur; must be greater than 0.

public void assertTextSequence (Locator locator, String expected1, String... expected2)

Synonym for assertTextSequence(String, String[]) that calls getText() on the provided locator.

Parameters
locator the source of the text
expected1 the first expected text in the sequence
expected2 the rest of expected texts in the sequence

public void assertTextSequence (String srcText, String expected1, String... expected2)

Asserts that the text sequence 'expectedTextSequence' can be found in 'srcText'

Parameters
srcText the text to search in
expected1 the first expected text in the sequence
expected2 the rest of expected texts in the sequence

public void assertTextSequence (Locator locator, String[] expectedTextSequence)

Synonym for assertTextSequence(String, String[]) that calls getText() on the provided locator.

Parameters
locator the source of the text
expectedTextSequence the expected text sequence

public void assertTextSequence (String srcText, String[] expectedTextSequence)

Asserts that the text sequence 'expectedTextSequence' can be found in 'srcText'

Parameters
srcText the text to search in
expectedTextSequence the expected text sequence