Search in sources :

Example 1 with DeviceType

use of org.jupnp.model.types.DeviceType in project smarthome by eclipse.

the class HueBridgeDiscoveryParticipantOSGITest method setUp.

@Before
public void setUp() {
    discoveryParticipant = getService(UpnpDiscoveryParticipant.class, HueBridgeDiscoveryParticipant.class);
    assertThat(discoveryParticipant, is(notNullValue()));
    try {
        final RemoteService remoteService = null;
        hueDevice = new RemoteDevice(new RemoteDeviceIdentity(new UDN("123"), 60, new URL("http://hue"), null, null), new DeviceType("namespace", "type"), new DeviceDetails(new URL("http://1.2.3.4/"), "Hue Bridge", new ManufacturerDetails("Philips"), new ModelDetails("Philips hue bridge"), "serial123", "upc", null), remoteService);
        otherDevice = new RemoteDevice(new RemoteDeviceIdentity(new UDN("567"), 60, new URL("http://acme"), null, null), new DeviceType("namespace", "type"), new DeviceDetails("Some Device", new ManufacturerDetails("Taiwan"), new ModelDetails("$%&/"), "serial567", "upc"), remoteService);
    } catch (final ValidationException | MalformedURLException ex) {
        Assert.fail("Internal test error.");
    }
}
Also used : DeviceDetails(org.jupnp.model.meta.DeviceDetails) ModelDetails(org.jupnp.model.meta.ModelDetails) MalformedURLException(java.net.MalformedURLException) ValidationException(org.jupnp.model.ValidationException) HueBridgeDiscoveryParticipant(org.eclipse.smarthome.binding.hue.internal.discovery.HueBridgeDiscoveryParticipant) UpnpDiscoveryParticipant(org.eclipse.smarthome.config.discovery.upnp.UpnpDiscoveryParticipant) RemoteDeviceIdentity(org.jupnp.model.meta.RemoteDeviceIdentity) URL(java.net.URL) ManufacturerDetails(org.jupnp.model.meta.ManufacturerDetails) DeviceType(org.jupnp.model.types.DeviceType) RemoteService(org.jupnp.model.meta.RemoteService) RemoteDevice(org.jupnp.model.meta.RemoteDevice) UDN(org.jupnp.model.types.UDN) Before(org.junit.Before)

Aggregations

MalformedURLException (java.net.MalformedURLException)1 URL (java.net.URL)1 HueBridgeDiscoveryParticipant (org.eclipse.smarthome.binding.hue.internal.discovery.HueBridgeDiscoveryParticipant)1 UpnpDiscoveryParticipant (org.eclipse.smarthome.config.discovery.upnp.UpnpDiscoveryParticipant)1 Before (org.junit.Before)1 ValidationException (org.jupnp.model.ValidationException)1 DeviceDetails (org.jupnp.model.meta.DeviceDetails)1 ManufacturerDetails (org.jupnp.model.meta.ManufacturerDetails)1 ModelDetails (org.jupnp.model.meta.ModelDetails)1 RemoteDevice (org.jupnp.model.meta.RemoteDevice)1 RemoteDeviceIdentity (org.jupnp.model.meta.RemoteDeviceIdentity)1 RemoteService (org.jupnp.model.meta.RemoteService)1 DeviceType (org.jupnp.model.types.DeviceType)1 UDN (org.jupnp.model.types.UDN)1