Search in sources :

Example 31 with StateDescription

use of org.eclipse.smarthome.core.types.StateDescription in project smarthome by eclipse.

the class EnrichedItemDTOMapperWithTransformOSGiTest method setup.

@Before
public void setup() {
    initMocks(this);
    StateDescription stateDescription = new StateDescription(BigDecimal.ZERO, BigDecimal.valueOf(100), BigDecimal.TEN, "%d °C", true, Collections.singletonList(new StateOption("SOUND", "My great sound.")));
    when(stateDescriptionService.getStateDescription(ITEM_NAME, null)).thenReturn(stateDescription);
}
Also used : StateOption(org.eclipse.smarthome.core.types.StateOption) StateDescription(org.eclipse.smarthome.core.types.StateDescription) Before(org.junit.Before)

Aggregations

StateDescription (org.eclipse.smarthome.core.types.StateDescription)31 Test (org.junit.Test)15 StateOption (org.eclipse.smarthome.core.types.StateOption)13 NumberItem (org.eclipse.smarthome.core.library.items.NumberItem)7 ArrayList (java.util.ArrayList)6 StringType (org.eclipse.smarthome.core.library.types.StringType)6 ChannelType (org.eclipse.smarthome.core.thing.type.ChannelType)6 BigDecimal (java.math.BigDecimal)4 Item (org.eclipse.smarthome.core.items.Item)4 ChannelTypeUID (org.eclipse.smarthome.core.thing.type.ChannelTypeUID)4 StateDescriptionProvider (org.eclipse.smarthome.core.types.StateDescriptionProvider)4 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)4 GroupItem (org.eclipse.smarthome.core.items.GroupItem)3 ColorItem (org.eclipse.smarthome.core.library.items.ColorItem)3 DimmerItem (org.eclipse.smarthome.core.library.items.DimmerItem)3 StringItem (org.eclipse.smarthome.core.library.items.StringItem)3 SwitchItem (org.eclipse.smarthome.core.library.items.SwitchItem)3 JavaOSGiTest (org.eclipse.smarthome.test.java.JavaOSGiTest)3 Before (org.junit.Before)3 Collection (java.util.Collection)2