|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
com.atlassian.confluence.ThreadLocalWebTestCase
com.atlassian.confluence.AbstractAtlassianWebTestCase
public abstract class AbstractAtlassianWebTestCase
This super class provides extensions to JWebUnit useful in acceptance tests.
Field Summary | |
---|---|
protected org.slf4j.Logger |
log
|
Constructor Summary | |
---|---|
AbstractAtlassianWebTestCase()
|
|
AbstractAtlassianWebTestCase(String testName)
|
Method Summary | |
---|---|
protected void |
assertCollectionContainsKeyWithValue(Collection collection,
String key,
String value)
|
protected static void |
assertContains(String expectedSubstring,
String actual)
|
protected static void |
assertDoesNotContain(String unexpectedSubstring,
String actual)
|
protected static void |
assertEndsWith(String expectedSuffix,
String actual)
|
void |
assertLinkNotPresentWithHrefContaining(String urlSubstring)
|
void |
assertLinkPresentWithHref(String url)
|
void |
assertLinkPresentWithHrefContaining(String urlSubstring)
|
void |
assertLinkPresentWithTextAndHref(String text,
String href)
|
void |
assertPageTitleEquals(String pageTitle)
Asserts that the title equals the passed pageTitle plus the site suffix (usually SITE_TITLE_SUFFIX) e.g. |
void |
assertServerResponseContains(String string)
|
void |
assertServerResponseDoesNotContain(String string)
|
protected static void |
assertStartsWith(String expectedPrefix,
String actual)
|
void |
assertStatusCode(int expectedStatus)
|
void |
assertTextPresentInPageSource(String text)
Asserts that the given text is in the page source. |
void |
assertTextsPresentInOrder(String... texts)
Asserts that all the given texts appear in the current response in the order in which they appear in the array. |
void |
assertTextsPresentInOrder(String[] expected,
String[] unexpected)
Asserts that all the given expected texts appear in the current response in the order in which they appear in the array, with none of the unexpected Strings occurring in-between. |
void |
assertTitleEquals(String s)
Deprecated. Don't use directly, use assertPageTitleEquals(String) or assertTitleEquals(String, String) |
void |
assertTitleEquals(String pageTitle,
String spaceTitle)
Asserts that the title equals the passed pageTitle plus separator plus spaceTitle plus site suffix (usually SITE_TITLE_SUFFIX). |
protected String |
getGroupFromResponse(String pattern)
|
void |
setTextFieldUnlessBlank(String inputName,
String value)
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runTest, setName, setUp, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final transient org.slf4j.Logger log
Constructor Detail |
---|
public AbstractAtlassianWebTestCase()
public AbstractAtlassianWebTestCase(String testName)
Method Detail |
---|
protected String getGroupFromResponse(String pattern)
public void assertPageTitleEquals(String pageTitle)
pageTitle
- The title displayed before the first separatorpublic void assertTitleEquals(String pageTitle, String spaceTitle)
pageTitle
- The title displayed before the first separatorspaceTitle
- The title displayed for the tested space@Deprecated public void assertTitleEquals(String s)
assertPageTitleEquals(String)
or assertTitleEquals(String, String)
ThreadLocalWebTestCase
assertTitleEquals
in class ThreadLocalWebTestCase
s
- expected title valueprotected void assertCollectionContainsKeyWithValue(Collection collection, String key, String value) throws Exception
Exception
public void assertTextsPresentInOrder(String... texts)
texts
- an array of strings expected to appear in the responsepublic void assertTextsPresentInOrder(String[] expected, String[] unexpected)
expected
- an array of strings expected to appear in the responseunexpected
- an array of string unexpected to appear in the responsepublic void assertTextPresentInPageSource(String text)
text
- the text to look forpublic void assertLinkPresentWithHref(String url)
public void assertLinkPresentWithHrefContaining(String urlSubstring)
public void assertLinkNotPresentWithHrefContaining(String urlSubstring)
public void assertLinkPresentWithTextAndHref(String text, String href)
public void setTextFieldUnlessBlank(String inputName, String value)
public void assertStatusCode(int expectedStatus)
public void assertServerResponseContains(String string)
public void assertServerResponseDoesNotContain(String string)
protected static void assertContains(String expectedSubstring, String actual)
protected static void assertDoesNotContain(String unexpectedSubstring, String actual)
protected static void assertEndsWith(String expectedSuffix, String actual)
protected static void assertStartsWith(String expectedPrefix, String actual)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |