@Test public void shouldNotBeInAnyCategoryIfNull() { StockAdjustmentReason invalidReason = new StockAdjustmentReason(); assertThat(invalidReason.inCategory(null), is(false)); }
public boolean inCategory(Category category) { if(null == category) return false; return getCategory() == category; }
StockAdjustmentReason extends BaseModel implements Importable { public boolean inCategory(Category category) { if(null == category) return false; return getCategory() == category; } }
StockAdjustmentReason extends BaseModel implements Importable { public boolean inCategory(Category category) { if(null == category) return false; return getCategory() == category; } @Deprecated  StockAdjustmentReason(); private  StockAdjustmentReason(String name,
                               String description,
                               boolean additive,
                               int displayOrder,
                               boolean isDefault,
                               Category category); }
StockAdjustmentReason extends BaseModel implements Importable { public boolean inCategory(Category category) { if(null == category) return false; return getCategory() == category; } @Deprecated  StockAdjustmentReason(); private  StockAdjustmentReason(String name,
                               String description,
                               boolean additive,
                               int displayOrder,
                               boolean isDefault,
                               Category category); static StockAdjustmentReason create(String name); static StockAdjustmentReason create(String name, String description); void setName(String name); void setDescription(String description); void setCategory(String category); boolean inCategory(Category category); }
StockAdjustmentReason extends BaseModel implements Importable { public boolean inCategory(Category category) { if(null == category) return false; return getCategory() == category; } @Deprecated  StockAdjustmentReason(); private  StockAdjustmentReason(String name,
                               String description,
                               boolean additive,
                               int displayOrder,
                               boolean isDefault,
                               Category category); static StockAdjustmentReason create(String name); static StockAdjustmentReason create(String name, String description); void setName(String name); void setDescription(String description); void setCategory(String category); boolean inCategory(Category category);  }