use of org.eclipse.smarthome.binding.homematic.test.util.SimpleDiscoveryListener in project smarthome by eclipse.
the class HomematicDeviceDiscoveryServiceTest method testDiscoveryResultIsReportedForNewDevice.
@Test
public void testDiscoveryResultIsReportedForNewDevice() {
SimpleDiscoveryListener discoveryListener = new SimpleDiscoveryListener();
homematicDeviceDiscoveryService.addDiscoveryListener(discoveryListener);
HmDevice hmDevice = createDimmerHmDevice();
homematicDeviceDiscoveryService.deviceDiscovered(hmDevice);
assertThat(discoveryListener.discoveredResults.size(), is(1));
discoveryResultMatchesHmDevice(discoveryListener.discoveredResults.element(), hmDevice);
}
Aggregations