@Test public void getClassNamePrefixShouldReturnText() throws Exception { final JTextComponentFixture fixture = findTextFieldByName("settings.name.class.prefix"); fixture.requireEnabled(); fixture.requireEmpty(); fixture.target().setText("Foo"); final String actual = underTest.getClassNamePrefix(); assertThat(actual) .overridingErrorMessage("Expected prefix to be <%s> but was <%s>", "Foo", actual) .isEqualTo("Foo"); }
@Nonnull @CheckReturnValue public String getClassNamePrefix() { return classNamePrefixField.getText().trim(); }
SettingsPanel implements Disposable, ActionListener, DocumentListener { @Nonnull @CheckReturnValue public String getClassNamePrefix() { return classNamePrefixField.getText().trim(); } }
SettingsPanel implements Disposable, ActionListener, DocumentListener { @Nonnull @CheckReturnValue public String getClassNamePrefix() { return classNamePrefixField.getText().trim(); } SettingsPanel(); }
SettingsPanel implements Disposable, ActionListener, DocumentListener { @Nonnull @CheckReturnValue public String getClassNamePrefix() { return classNamePrefixField.getText().trim(); } SettingsPanel(); @Override void dispose(); @Override void actionPerformed(@Nonnull ActionEvent event); @Override void insertUpdate(@Nonnull DocumentEvent event); @Override void removeUpdate(@Nonnull DocumentEvent event); @Override void changedUpdate(@Nonnull DocumentEvent event); @Nonnull @CheckReturnValue JComponent getComponent(); @Nonnull @CheckReturnValue Style getStyle(); void setStyle(@Nonnull Style style); @Nonnull @CheckReturnValue String getClassNamePrefix(); void setClassNamePrefix(@Nonnull String prefix); @Nonnull @CheckReturnValue String getClassNameSuffix(); void setClassNameSuffix(@Nonnull String suffix); @CheckReturnValue boolean isGeneratedAnnotationEnabled(); void setGeneratedAnnotationEnabled(boolean enabled); @CheckReturnValue boolean isSuppressWarningsAnnotationEnabled(); void setSuppressWarningsAnnotationEnabled(boolean enabled); void setPreviewText(@Nonnull String text); }
SettingsPanel implements Disposable, ActionListener, DocumentListener { @Nonnull @CheckReturnValue public String getClassNamePrefix() { return classNamePrefixField.getText().trim(); } SettingsPanel(); @Override void dispose(); @Override void actionPerformed(@Nonnull ActionEvent event); @Override void insertUpdate(@Nonnull DocumentEvent event); @Override void removeUpdate(@Nonnull DocumentEvent event); @Override void changedUpdate(@Nonnull DocumentEvent event); @Nonnull @CheckReturnValue JComponent getComponent(); @Nonnull @CheckReturnValue Style getStyle(); void setStyle(@Nonnull Style style); @Nonnull @CheckReturnValue String getClassNamePrefix(); void setClassNamePrefix(@Nonnull String prefix); @Nonnull @CheckReturnValue String getClassNameSuffix(); void setClassNameSuffix(@Nonnull String suffix); @CheckReturnValue boolean isGeneratedAnnotationEnabled(); void setGeneratedAnnotationEnabled(boolean enabled); @CheckReturnValue boolean isSuppressWarningsAnnotationEnabled(); void setSuppressWarningsAnnotationEnabled(boolean enabled); void setPreviewText(@Nonnull String text);  }