/** * Asserts that the text of this fixture's {@code JLabel} is equal to the specified {@code String}. * * @param expected the text to match. * @return this fixture. * @throws AssertionError if the text of this fixture's {@code JLabel} is not equal to the given one. */ @Override @Nonnull public JLabelFixture requireText(@Nullable String expected) { driver().requireText(target(), expected); return this; }
/** * @return the text of this fixture's {@code JLabel}. */ @Override @Nullable public String text() { return driver().textOf(target()); }
/** * Asserts that the text of this fixture's {@code JLabel} matches the given regular expression pattern. * * @param pattern the regular expression pattern to match. * @return this fixture. * @throws AssertionError if the text of this fixture's {@code JLabel} does not match the given regular expression * pattern. * @throws NullPointerException if the given regular expression pattern is {@code null}. */ @Override @Nonnull public JLabelFixture requireText(@Nonnull Pattern pattern) { driver().requireText(target(), pattern); return this; } }