@Test public void getSuffix() throws Exception { assertEquals("°", expansionCategoryFormatter.getSuffix(Category.TEMPERATURE)); assertEquals("%", expansionCategoryFormatter.getSuffix(Category.LIGHT)); assertEquals("", expansionCategoryFormatter.getSuffix(Category.UNKNOWN)); }
public String getSuffix(@NonNull final Category category) { switch (category) { case LIGHT: return UnitFormatter.UNIT_SUFFIX_PERCENT; case TEMPERATURE: return UnitFormatter.UNIT_SUFFIX_TEMPERATURE; default: return Constants.EMPTY_STRING; } }
ExpansionCategoryFormatter { public String getSuffix(@NonNull final Category category) { switch (category) { case LIGHT: return UnitFormatter.UNIT_SUFFIX_PERCENT; case TEMPERATURE: return UnitFormatter.UNIT_SUFFIX_TEMPERATURE; default: return Constants.EMPTY_STRING; } } }
ExpansionCategoryFormatter { public String getSuffix(@NonNull final Category category) { switch (category) { case LIGHT: return UnitFormatter.UNIT_SUFFIX_PERCENT; case TEMPERATURE: return UnitFormatter.UNIT_SUFFIX_TEMPERATURE; default: return Constants.EMPTY_STRING; } } @Inject  ExpansionCategoryFormatter(@NonNull final UnitFormatter unitFormatter); }
ExpansionCategoryFormatter { public String getSuffix(@NonNull final Category category) { switch (category) { case LIGHT: return UnitFormatter.UNIT_SUFFIX_PERCENT; case TEMPERATURE: return UnitFormatter.UNIT_SUFFIX_TEMPERATURE; default: return Constants.EMPTY_STRING; } } @Inject  ExpansionCategoryFormatter(@NonNull final UnitFormatter unitFormatter); String getFormattedValueRange(@NonNull final Category category,
                                         @NonNull final ExpansionValueRange valueRange,
                                         @NonNull final Context context); Pair<Integer,Integer> getInitialValuePair(@NonNull final Category category,
                                     @NonNull final List<Capability> capabilities,
                                     @NonNull final ExpansionValueRange valueRange); ExpansionValueRange getIdealValueRange(@NonNull final Category category,
                                                  @NonNull final ExpansionValueRange valueRange); UnitConverter getUnitConverter(@NonNull final Category category); UnitConverter getReverseUnitConverter(@NonNull final Category category); String getFormattedAttributionValueRange(@NonNull final Category category,
                                                    @NonNull final ExpansionValueRange expansionRange,
                                                    @NonNull final Context context); String getSuffix(@NonNull final Category category); @DrawableRes int getDisplayIconRes(@NonNull final Category category); @StringRes int getDisplayValueResFromState(@NonNull final State expansionState); @XmlRes int getExpansionInfoDialogXmlRes(@NonNull final Category category); @XmlRes int getExpansionAlarmInfoDialogXmlRes(@NonNull final Category category); }
ExpansionCategoryFormatter { public String getSuffix(@NonNull final Category category) { switch (category) { case LIGHT: return UnitFormatter.UNIT_SUFFIX_PERCENT; case TEMPERATURE: return UnitFormatter.UNIT_SUFFIX_TEMPERATURE; default: return Constants.EMPTY_STRING; } } @Inject  ExpansionCategoryFormatter(@NonNull final UnitFormatter unitFormatter); String getFormattedValueRange(@NonNull final Category category,
                                         @NonNull final ExpansionValueRange valueRange,
                                         @NonNull final Context context); Pair<Integer,Integer> getInitialValuePair(@NonNull final Category category,
                                     @NonNull final List<Capability> capabilities,
                                     @NonNull final ExpansionValueRange valueRange); ExpansionValueRange getIdealValueRange(@NonNull final Category category,
                                                  @NonNull final ExpansionValueRange valueRange); UnitConverter getUnitConverter(@NonNull final Category category); UnitConverter getReverseUnitConverter(@NonNull final Category category); String getFormattedAttributionValueRange(@NonNull final Category category,
                                                    @NonNull final ExpansionValueRange expansionRange,
                                                    @NonNull final Context context); String getSuffix(@NonNull final Category category); @DrawableRes int getDisplayIconRes(@NonNull final Category category); @StringRes int getDisplayValueResFromState(@NonNull final State expansionState); @XmlRes int getExpansionInfoDialogXmlRes(@NonNull final Category category); @XmlRes int getExpansionAlarmInfoDialogXmlRes(@NonNull final Category category);  }