T - the type of Component this driver supports.public interface TextDisplayDriver<T extends Component>
Components that displays text.| Modifier and Type | Method and Description |
|---|---|
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.
|
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.Copyright © 2014 AssertJ. All rights reserved.