CategoryCombo extends BaseIdentifiableObject implements SystemDefaultMetadataObject { @JsonProperty( "isDefault" ) @Override public boolean isDefault() { return DEFAULT_CATEGORY_COMBO_NAME.equals( name ); } CategoryCombo();  CategoryCombo( String name, DataDimensionType dataDimensionType );  CategoryCombo( String name, DataDimensionType dataDimensionType, List<Category> categories ); @JsonProperty( "isDefault" ) @Override boolean isDefault(); boolean isValid(); List<CategoryOption> getCategoryOptions(); boolean doTotal(); boolean doSubTotals(); List<List<CategoryOption>> getCategoryOptionsAsLists(); List<CategoryOptionCombo> generateOptionCombosList(); List<CategoryOptionCombo> getSortedOptionCombos(); void generateOptionCombos(); boolean hasOptionCombos(); void addCategory( Category category ); void removeCategory( Category category ); void removeAllCategories(); @JsonProperty @JsonSerialize( contentAs = BaseIdentifiableObject.class ) @JacksonXmlElementWrapper( localName = "categories", namespace = DxfNamespaces.DXF_2_0 ) @JacksonXmlProperty( localName = "category", namespace = DxfNamespaces.DXF_2_0 ) List<Category> getCategories(); void setCategories( List<Category> categories ); @JsonProperty( "categoryOptionCombos" ) @JsonSerialize( contentAs = BaseIdentifiableObject.class ) @JacksonXmlElementWrapper( localName = "categoryOptionCombos", namespace = DxfNamespaces.DXF_2_0 ) @JacksonXmlProperty( localName = "categoryOptionCombo", namespace = DxfNamespaces.DXF_2_0 ) Set<CategoryOptionCombo> getOptionCombos(); void setOptionCombos( Set<CategoryOptionCombo> optionCombos ); @JsonProperty @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) DataDimensionType getDataDimensionType(); void setDataDimensionType( DataDimensionType dataDimensionType ); @JsonProperty @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) boolean isSkipTotal(); void setSkipTotal( boolean skipTotal ); static final String DEFAULT_CATEGORY_COMBO_NAME; }
@Test public void isDefault() { CategoryCombo category = new CategoryCombo(); category.setName( CategoryCombo.DEFAULT_CATEGORY_COMBO_NAME ); Assert.assertTrue( category.isDefault() ); }
@Test public void isNotDefault() { CategoryCombo category = new CategoryCombo(); category.setName( CategoryCombo.DEFAULT_CATEGORY_COMBO_NAME + "x" ); Assert.assertFalse( category.isDefault() ); }