|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the type of Component
this driver supports.public interface TextDisplayDriver<T extends Component>
Supports functional testing of an AWT or Swing Component
s that displays text.
Method Summary | |
---|---|
void |
requireText(T component,
Pattern pattern)
Asserts that the text in the given component matches the given regular expression pattern. |
void |
requireText(T component,
String expected)
Asserts that the text in the given component is equal to or matches the specified String . |
String |
textOf(T component)
Returns the text of the given component. |
Method Detail |
---|
void requireText(@Nonnull T component, @Nullable String expected)
String
.
component
- the given component.expected
- the text to match. It can be a regular expression.
AssertionError
- if the text of the component is not equal to or does not match the given one.void requireText(@Nonnull T component, @Nonnull Pattern pattern)
component
- the given component.pattern
- the regular expression pattern to match.
NullPointerException
- if the given regular expression pattern is null
.
AssertionError
- if the text of the component does not match the given regular expression pattern.@Nullable String textOf(@Nonnull T component)
component
- the given component.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |