@Test public void getUnitConverter() throws Exception { assertEquals(UnitConverter.IDENTITY, expansionCategoryFormatter.getUnitConverter(Category.LIGHT)); assertEquals(UnitConverter.IDENTITY, expansionCategoryFormatter.getUnitConverter(Category.UNKNOWN)); }
public UnitConverter getUnitConverter(@NonNull final Category category) { switch (category) { case TEMPERATURE: return unitFormatter.getTemperatureUnitConverter(); default: return UnitConverter.IDENTITY; } }
ExpansionCategoryFormatter { public UnitConverter getUnitConverter(@NonNull final Category category) { switch (category) { case TEMPERATURE: return unitFormatter.getTemperatureUnitConverter(); default: return UnitConverter.IDENTITY; } } }
ExpansionCategoryFormatter { public UnitConverter getUnitConverter(@NonNull final Category category) { switch (category) { case TEMPERATURE: return unitFormatter.getTemperatureUnitConverter(); default: return UnitConverter.IDENTITY; } } @Inject  ExpansionCategoryFormatter(@NonNull final UnitFormatter unitFormatter); }
ExpansionCategoryFormatter { public UnitConverter getUnitConverter(@NonNull final Category category) { switch (category) { case TEMPERATURE: return unitFormatter.getTemperatureUnitConverter(); default: return UnitConverter.IDENTITY; } } @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 UnitConverter getUnitConverter(@NonNull final Category category) { switch (category) { case TEMPERATURE: return unitFormatter.getTemperatureUnitConverter(); default: return UnitConverter.IDENTITY; } } @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);  }