Search in sources :

Example 1 with ModelBridge

use of org.eclipse.smarthome.model.thing.thing.ModelBridge in project smarthome by eclipse.

the class GenericThingProviderMultipleBundlesTest method createModelBridge.

private EList<ModelThing> createModelBridge() {
    ModelBridge bridge = mock(ModelBridge.class);
    when(bridge.getId()).thenReturn(BRIDGE_UID.toString());
    when(bridge.getProperties()).thenReturn(new BasicEList<>(0));
    when(bridge.getChannels()).thenReturn(new BasicEList<>(0));
    EList<ModelThing> modelThings = createModelThing();
    when(bridge.getThings()).thenReturn(modelThings);
    BasicEList<ModelThing> result = new BasicEList<ModelThing>();
    result.add(bridge);
    return result;
}
Also used : BasicEList(org.eclipse.emf.common.util.BasicEList) ModelBridge(org.eclipse.smarthome.model.thing.thing.ModelBridge) ModelThing(org.eclipse.smarthome.model.thing.thing.ModelThing)

Aggregations

BasicEList (org.eclipse.emf.common.util.BasicEList)1 ModelBridge (org.eclipse.smarthome.model.thing.thing.ModelBridge)1 ModelThing (org.eclipse.smarthome.model.thing.thing.ModelThing)1