use of org.eclipse.smarthome.binding.dmx.handler.DimmerThingHandler in project smarthome by eclipse.
the class DimmerThingHandlerTest method setUp.
@Before
public void setUp() {
super.setup();
thingProperties = new HashMap<>();
thingProperties.put(CONFIG_DMX_ID, TEST_CHANNEL_CONFIG);
thingProperties.put(CONFIG_DIMMER_FADE_TIME, TEST_FADE_TIME);
dimmerThing = ThingBuilder.create(THING_TYPE_DIMMER, "testdimmer").withLabel("Dimmer Thing").withBridge(bridge.getUID()).withConfiguration(new Configuration(thingProperties)).withChannel(ChannelBuilder.create(CHANNEL_UID_BRIGHTNESS, "Brightness").withType(BRIGHTNESS_CHANNEL_TYPEUID).build()).build();
dimmerThingHandler = new DimmerThingHandler(dimmerThing) {
@Override
@Nullable
protected Bridge getBridge() {
return bridge;
}
};
initializeHandler(dimmerThingHandler);
}
use of org.eclipse.smarthome.binding.dmx.handler.DimmerThingHandler in project smarthome by eclipse.
the class DmxChannelTest method setup.
@Before
public void setup() {
dimmerThingHandler = Mockito.mock(DimmerThingHandler.class);
dmxChannel = new DmxChannel(0, 1, 0);
dmxChannel.addListener(valueChannelUID, dimmerThingHandler, ListenerType.VALUE);
dmxChannel.setValue(0);
currentTime = System.currentTimeMillis();
}
use of org.eclipse.smarthome.binding.dmx.handler.DimmerThingHandler in project smarthome by eclipse.
the class DimmerThingHandlerTest method testThingStatus_noBridge.
@Test
public void testThingStatus_noBridge() {
// check that thing is offline if no bridge found
DimmerThingHandler dimmerHandlerWithoutBridge = new DimmerThingHandler(dimmerThing) {
@Override
@Nullable
protected Bridge getBridge() {
return null;
}
};
assertThingStatusWithoutBridge(dimmerHandlerWithoutBridge);
}
Aggregations