|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swtbot.swt.finder.SWTBotAssert
public abstract class SWTBotAssert
The SWTBotAssert provides extra capabilities for comparing widgets and other UI items. A set of assert methods.
Messages are only displayed when an assert fails. See Assert
| Constructor Summary | |
|---|---|
SWTBotAssert()
|
|
| Method Summary | |
|---|---|
static void |
assertContains(String needle,
String hayStack)
Asserts that the needle is contained within the hayStack. |
static void |
assertDoesNotContain(String needle,
String hayStack)
Asserts that the needle is not present in the hayStack. |
static void |
assertEnabled(AbstractSWTBot<? extends Widget> widget)
Asserts that the widget is enabled. |
static void |
assertMatchesRegex(String regex,
AbstractSWTBot<? extends Widget> actual)
Assert that the widget text matches the regex. |
static void |
assertMatchesRegex(String regex,
String actual)
Assert that the widget text matches the regex. |
static void |
assertMatchesRegex(String regex,
Widget actual)
Assert that the widget text matches the regex. |
static void |
assertNotEnabled(AbstractSWTBot<? extends Widget> widget)
Asserts that the widget is not enabled. |
static void |
assertNotSameWidget(String message,
Widget expected,
Widget actual)
Asserts the two widgets do not refer to the same object. |
static void |
assertNotSameWidget(Widget expected,
Widget actual)
Asserts that two widgets do not refer to the same object. |
static void |
assertNotVisible(AbstractSWTBot<? extends Widget> widget)
Asserts that the widget is not visible. |
static void |
assertSameWidget(String message,
Widget expected,
Widget actual)
Asserts that two widgets refer to the same widgets. |
static void |
assertSameWidget(Widget expected,
Widget actual)
Asserts that two widgets refer to the same widget. |
static void |
assertText(String expected,
AbstractSWTBot<? extends Widget> widget)
Assert that the given string is the same as the widgets text. |
static void |
assertText(String expected,
Widget widget)
Assert that the given string is the same as the widgets text. |
static void |
assertTextContains(String expected,
AbstractSWTBot<? extends Widget> widget)
Assert that the text on the widget contains the expected text. |
static void |
assertTextContains(String expected,
Widget widget)
Assert that the text on the widget contains the expected text. |
static void |
assertTextDoesNotContain(String expected,
AbstractSWTBot<? extends Widget> widget)
Assert that the text on the widget does not contain the expected text. |
static void |
assertTextDoesNotContain(String expected,
Widget widget)
Assert that the text on the widget does not contain the expected text. |
static void |
assertVisible(AbstractSWTBot<? extends Widget> widget)
Asserts that the widget is visible. |
static void |
pass()
A helper to explicitly convey that the test has passed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SWTBotAssert()
| Method Detail |
|---|
public static void assertNotSameWidget(Widget expected,
Widget actual)
expected - the object you don't expectactual - the object to compare to unexpectedAssert.assertNotSame(String, Object, Object)
public static void assertNotSameWidget(String message,
Widget expected,
Widget actual)
message - the identifying message or null for the AssertionErrorexpected - the object you don't expectactual - the object to compare to unexpected
public static void assertContains(String needle,
String hayStack)
needle is contained within the hayStack.
needle - the text to search in the hayStack.hayStack - the text to look within.
public static void assertDoesNotContain(String needle,
String hayStack)
needle is not present in the hayStack.
needle - the text to search in the hayStack.hayStack - the text to look within.
public static void assertSameWidget(Widget expected,
Widget actual)
expected - the expected widgetactual - the widget to compare to expected
public static void assertSameWidget(String message,
Widget expected,
Widget actual)
message - the identifying message or null for the AssertionErrorexpected - the expected widgetactual - the widget to compare to expectedpublic static void pass()
public static void assertText(String expected,
Widget widget)
expected - the expected textwidget - the widget to get the text from to compare.
public static void assertText(String expected,
AbstractSWTBot<? extends Widget> widget)
expected - the expected textwidget - the widget to get the text from to compare.
public static void assertTextContains(String expected,
Widget widget)
expected - the expected text.widget - the widget
public static void assertTextContains(String expected,
AbstractSWTBot<? extends Widget> widget)
expected - the expected textwidget - the widget
public static void assertTextDoesNotContain(String expected,
Widget widget)
expected - the expected textwidget - the widget
public static void assertTextDoesNotContain(String expected,
AbstractSWTBot<? extends Widget> widget)
expected - the expected textwidget - the widgetpublic static void assertEnabled(AbstractSWTBot<? extends Widget> widget)
widget - the widget.public static void assertNotEnabled(AbstractSWTBot<? extends Widget> widget)
widget - the widget.public static void assertVisible(AbstractSWTBot<? extends Widget> widget)
widget - the widget.public static void assertNotVisible(AbstractSWTBot<? extends Widget> widget)
widget - the widget.
public static void assertMatchesRegex(String regex,
AbstractSWTBot<? extends Widget> actual)
regex - the regex.actual - the widget.
public static void assertMatchesRegex(String regex,
Widget actual)
regex - the regex.actual - the widget.
public static void assertMatchesRegex(String regex,
String actual)
regex - the regex.actual - the widget.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||