Search in sources :

Example 6 with HomematicGateway

use of org.eclipse.smarthome.binding.homematic.internal.communicator.HomematicGateway in project smarthome by eclipse.

the class HomematicDeviceDiscoveryServiceTest method mockHomematicBridgeHandler.

private HomematicBridgeHandler mockHomematicBridgeHandler() throws IOException {
    HomematicBridgeHandler homematicBridgeHandler = mock(HomematicBridgeHandler.class);
    Bridge bridge = createHomematicBridge();
    HomematicGateway homematicGateway = mockHomematicGateway();
    HomematicTypeGenerator homematicTypeGenerator = mockHomematicTypeGenerator();
    when(homematicBridgeHandler.getThing()).thenReturn(bridge);
    when(homematicBridgeHandler.getGateway()).thenReturn(homematicGateway);
    when(homematicBridgeHandler.getTypeGenerator()).thenReturn(homematicTypeGenerator);
    return homematicBridgeHandler;
}
Also used : HomematicBridgeHandler(org.eclipse.smarthome.binding.homematic.handler.HomematicBridgeHandler) HomematicGateway(org.eclipse.smarthome.binding.homematic.internal.communicator.HomematicGateway) BridgeHelper.createHomematicBridge(org.eclipse.smarthome.binding.homematic.test.util.BridgeHelper.createHomematicBridge) Bridge(org.eclipse.smarthome.core.thing.Bridge) HomematicTypeGenerator(org.eclipse.smarthome.binding.homematic.internal.type.HomematicTypeGenerator)

Example 7 with HomematicGateway

use of org.eclipse.smarthome.binding.homematic.internal.communicator.HomematicGateway in project smarthome by eclipse.

the class HomematicDeviceDiscoveryServiceTest method mockHomematicGateway.

private HomematicGateway mockHomematicGateway() throws IOException {
    HomematicGateway homematicGateway = mock(HomematicGateway.class);
    when(homematicGateway.getInstallMode()).thenReturn(60);
    return homematicGateway;
}
Also used : HomematicGateway(org.eclipse.smarthome.binding.homematic.internal.communicator.HomematicGateway)

Aggregations

HomematicGateway (org.eclipse.smarthome.binding.homematic.internal.communicator.HomematicGateway)7 HmDatapoint (org.eclipse.smarthome.binding.homematic.internal.model.HmDatapoint)4 HmChannel (org.eclipse.smarthome.binding.homematic.internal.model.HmChannel)3 HmDatapointInfo (org.eclipse.smarthome.binding.homematic.internal.model.HmDatapointInfo)3 Channel (org.eclipse.smarthome.core.thing.Channel)3 IOException (java.io.IOException)2 HomematicClientException (org.eclipse.smarthome.binding.homematic.internal.misc.HomematicClientException)2 HmDatapointConfig (org.eclipse.smarthome.binding.homematic.internal.model.HmDatapointConfig)2 HmDevice (org.eclipse.smarthome.binding.homematic.internal.model.HmDevice)2 BigDecimal (java.math.BigDecimal)1 ArrayList (java.util.ArrayList)1 ExecutionException (java.util.concurrent.ExecutionException)1 HomematicBridgeHandler (org.eclipse.smarthome.binding.homematic.handler.HomematicBridgeHandler)1 ConverterException (org.eclipse.smarthome.binding.homematic.internal.converter.ConverterException)1 ConverterTypeException (org.eclipse.smarthome.binding.homematic.internal.converter.ConverterTypeException)1 HomematicTypeGenerator (org.eclipse.smarthome.binding.homematic.internal.type.HomematicTypeGenerator)1 BridgeHelper.createHomematicBridge (org.eclipse.smarthome.binding.homematic.test.util.BridgeHelper.createHomematicBridge)1 Configuration (org.eclipse.smarthome.config.core.Configuration)1 ConfigValidationException (org.eclipse.smarthome.config.core.validation.ConfigValidationException)1 Bridge (org.eclipse.smarthome.core.thing.Bridge)1