use of org.eclipse.smarthome.core.thing.binding.ThingTypeProvider in project smarthome by eclipse.
the class ThingManagerOSGiJavaTest method registerThingTypeProvider.
private void registerThingTypeProvider() throws Exception {
ThingType thingType = ThingTypeBuilder.instance(THING_TYPE_UID, "label").withConfigDescriptionURI(CONFIG_DESCRIPTION_THING).withChannelDefinitions(Collections.singletonList(new ChannelDefinition("channel", CHANNEL_TYPE_UID))).build();
ThingTypeProvider mockThingTypeProvider = mock(ThingTypeProvider.class);
when(mockThingTypeProvider.getThingType(eq(THING_TYPE_UID), any())).thenReturn(thingType);
registerService(mockThingTypeProvider);
}
Aggregations