use of org.eclipse.smarthome.binding.dmx.handler.ColorThingHandler in project smarthome by eclipse.
the class ColorThingHandlerTest method testThingStatus_noBridge.
@Test
public void testThingStatus_noBridge() {
// check that thing is offline if no bridge found
ColorThingHandler dimmerHandlerWithoutBridge = new ColorThingHandler(dimmerThing) {
@Override
@Nullable
protected Bridge getBridge() {
return null;
}
};
assertThingStatusWithoutBridge(dimmerHandlerWithoutBridge);
}
use of org.eclipse.smarthome.binding.dmx.handler.ColorThingHandler in project smarthome by eclipse.
the class ColorThingHandlerTest 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);
thingProperties.put(CONFIG_DIMMER_TURNONVALUE, "255,128,0");
dimmerThing = ThingBuilder.create(THING_TYPE_COLOR, "testdimmer").withLabel("Dimmer Thing").withBridge(bridge.getUID()).withConfiguration(new Configuration(thingProperties)).withChannel(ChannelBuilder.create(CHANNEL_UID_BRIGHTNESS_R, "Brightness R").withType(BRIGHTNESS_CHANNEL_TYPEUID).build()).withChannel(ChannelBuilder.create(CHANNEL_UID_BRIGHTNESS_G, "Brightness G").withType(BRIGHTNESS_CHANNEL_TYPEUID).build()).withChannel(ChannelBuilder.create(CHANNEL_UID_BRIGHTNESS_B, "Brightness B").withType(BRIGHTNESS_CHANNEL_TYPEUID).build()).withChannel(ChannelBuilder.create(CHANNEL_UID_COLOR, "Color").withType(COLOR_CHANNEL_TYPEUID).build()).build();
dimmerThingHandler = new ColorThingHandler(dimmerThing) {
@Override
@Nullable
protected Bridge getBridge() {
return bridge;
}
};
initializeHandler(dimmerThingHandler);
}
Aggregations