Search in sources :

Example 1 with ChaserThingHandler

use of org.eclipse.smarthome.binding.dmx.handler.ChaserThingHandler in project smarthome by eclipse.

the class ChaserThingHandlerTest method testThingStatus_noBridge.

@Test
public void testThingStatus_noBridge() {
    thingProperties.put(CONFIG_CHASER_STEPS, TEST_STEPS_INFINITE);
    initialize();
    // check that thing is offline if no bridge found
    ChaserThingHandler chaserHandlerWithoutBridge = new ChaserThingHandler(chaserThing) {

        @Override
        @Nullable
        protected Bridge getBridge() {
            return null;
        }
    };
    assertThingStatusWithoutBridge(chaserHandlerWithoutBridge);
}
Also used : ChaserThingHandler(org.eclipse.smarthome.binding.dmx.handler.ChaserThingHandler) Test(org.junit.Test)

Example 2 with ChaserThingHandler

use of org.eclipse.smarthome.binding.dmx.handler.ChaserThingHandler in project smarthome by eclipse.

the class ChaserThingHandlerTest method initialize.

private void initialize() {
    chaserThing = ThingBuilder.create(THING_TYPE_CHASER, "testchaser").withLabel("Chaser Thing").withBridge(bridge.getUID()).withConfiguration(new Configuration(thingProperties)).withChannel(ChannelBuilder.create(CHANNEL_UID_SWITCH, "Switch").withType(SWITCH_CHANNEL_TYPEUID).build()).build();
    chaserThingHandler = new ChaserThingHandler(chaserThing) {

        @Override
        @Nullable
        protected Bridge getBridge() {
            return bridge;
        }
    };
    initializeHandler(chaserThingHandler);
}
Also used : Configuration(org.eclipse.smarthome.config.core.Configuration) ChaserThingHandler(org.eclipse.smarthome.binding.dmx.handler.ChaserThingHandler) Nullable(org.eclipse.jdt.annotation.Nullable) Bridge(org.eclipse.smarthome.core.thing.Bridge)

Aggregations

ChaserThingHandler (org.eclipse.smarthome.binding.dmx.handler.ChaserThingHandler)2 Nullable (org.eclipse.jdt.annotation.Nullable)1 Configuration (org.eclipse.smarthome.config.core.Configuration)1 Bridge (org.eclipse.smarthome.core.thing.Bridge)1 Test (org.junit.Test)1