@Test public void getCategoriesReturnsSpecifiedCategories() { FormSection testSection = new FormSection(this.title, this.propertyName, null); Assert.assertTrue(testSection.getCategories().isEmpty()); testSection = new FormSection(this.title, this.propertyName, Collections.<String>emptySet()); Assert.assertTrue(testSection.getCategories().isEmpty()); testSection = new FormSection(this.title, this.propertyName, Collections.singleton("category")); Assert.assertEquals(Collections.singletonList("category"), testSection.getCategories()); }
public List<String> getCategories() { return this.categories; }
FormSection extends FormGroup { public List<String> getCategories() { return this.categories; } }
FormSection extends FormGroup { public List<String> getCategories() { return this.categories; } FormSection(String title, String propertyName, Collection<String> categories); }
FormSection extends FormGroup { public List<String> getCategories() { return this.categories; } FormSection(String title, String propertyName, Collection<String> categories); String getPropertyName(); @Override String getTitle(); @Override String display(DisplayMode mode, String[] fieldNames); FormGroup getCustomElements(); void setCustomElements(FormGroup customElements); List<String> getCategories(); }
FormSection extends FormGroup { public List<String> getCategories() { return this.categories; } FormSection(String title, String propertyName, Collection<String> categories); String getPropertyName(); @Override String getTitle(); @Override String display(DisplayMode mode, String[] fieldNames); FormGroup getCustomElements(); void setCustomElements(FormGroup customElements); List<String> getCategories();  }