S - used to simulate "self types." For more information please read "Emulating 'self types' using Java Generics to simplify fluent API implementation."public interface TextDisplayFixture<S>
Components that display text.| Modifier and Type | Method and Description |
|---|---|
S |
requireText(Pattern pattern)
Asserts that the text of this fixture's
Component matches the given regular expression pattern. |
S |
requireText(String expected)
Asserts that the text of this fixture's
Component is equal to or matches the specified String. |
String |
text() |
@Nonnull S requireText(@Nullable String expected)
Component is equal to or matches the specified String.expected - the text to match. It can be a regular expression.AssertionError - if the text of the target component is not equal to or does not match the given one.@Nonnull S requireText(@Nonnull Pattern pattern)
Component matches the given regular expression pattern.pattern - the regular expression pattern to match.NullPointerException - if the given regular expression pattern is null.AssertionError - if the text of the target component does not match the given regular expression pattern.Copyright © 2014 AssertJ. All rights reserved.