/** * Asserts that the text of this fixture's {@link AbstractButton} matches the specified value. * * @param expected the text to match. It can be a regular expression. * @return this fixture. * @throws AssertionError if the text of the target {@code AbstractButton} does not match the given one. */ @Override public final @Nonnull S requireText(@Nullable String expected) { driver().requireText(target(), expected); return myself(); }
/** * Asserts that the text of this fixture's {@link AbstractButton} matches the given regular expression pattern. * * @param pattern the regular expression pattern to match. * @return this fixture. * @throws NullPointerException if the given regular expression pattern is {@code null}. * @throws AssertionError if the text of the target {@code AbstractButton} does not match the given regular expression * pattern. */ @Override public final @Nonnull S requireText(@Nonnull Pattern pattern) { driver().requireText(target(), pattern); return myself(); } }