use of org.jupnp.model.meta.RemoteDevice in project smarthome by eclipse.
the class FSInternetRadioDiscoveryParticipantJavaTest method validDiscoveryResultIfWithoutBaseUrl.
/**
* Verify valid DiscoveryResult with FSInterntRadio device without base URL.
*
* @throws ValidationException
*/
@SuppressWarnings("null")
@Test
public void validDiscoveryResultIfWithoutBaseUrl() throws ValidationException {
RemoteDevice fsInternetRadioDeviceWithoutUrl = createDefaultFSInternetRadioDevice(null);
final DiscoveryResult result = discoveryParticipant.createResult(fsInternetRadioDeviceWithoutUrl);
assertEquals(new ThingUID(DEFAULT_RADIO_THING_UID), result.getThingUID());
assertEquals(FSInternetRadioBindingConstants.THING_TYPE_RADIO, result.getThingTypeUID());
assertEquals(DEFAULT_RADIO_MANIFACTURER, result.getProperties().get(FSInternetRadioBindingConstants.PROPERTY_MANUFACTURER));
assertEquals(DEFAULT_RADIO_MODEL_NUMBER, result.getProperties().get(FSInternetRadioBindingConstants.PROPERTY_MODEL));
}
use of org.jupnp.model.meta.RemoteDevice in project smarthome by eclipse.
the class FSInternetRadioDiscoveryParticipantJavaTest method createDefaultFSInternetRadioDevice.
private RemoteDevice createDefaultFSInternetRadioDevice(URL baseURL) throws ValidationException {
ManufacturerDetails manifacturerDetails = new ManufacturerDetails(DEFAULT_RADIO_MANIFACTURER);
ModelDetails modelDetails = new ModelDetails(DEFAULT_RADIO_MODEL_NAME, DEFAULT_RADIO_MODEL_DESCRIPTION, DEFAULT_RADIO_MODEL_NUMBER);
DeviceDetails deviceDetails = new DeviceDetails(baseURL, DEFAULT_RADIO_NAME, manifacturerDetails, modelDetails, DEFAULT_RADIO_SERIAL_NUMBER, DEFAULT_UPC, DEFAULT_URI);
final RemoteService remoteService = null;
return new RemoteDevice(DEFAULT_RADIO_IDENTITY, DEFAULT_TYPE, deviceDetails, remoteService);
}
use of org.jupnp.model.meta.RemoteDevice in project smarthome by eclipse.
the class FSInternetRadioDiscoveryParticipantJavaTest method validDiscoveryResultWithComplete.
/**
* Verify valid DiscoveryResult with completeFSInterntRadioDevice.
*
* @throws ValidationException
*/
@SuppressWarnings("null")
@Test
public void validDiscoveryResultWithComplete() throws ValidationException {
RemoteDevice completeFSInternetRadioDevice = createDefaultFSInternetRadioDevice(DEFAULT_RADIO_BASE_URL);
final DiscoveryResult result = discoveryParticipant.createResult(completeFSInternetRadioDevice);
assertEquals(new ThingUID(DEFAULT_RADIO_THING_UID), result.getThingUID());
assertEquals(FSInternetRadioBindingConstants.THING_TYPE_RADIO, result.getThingTypeUID());
assertEquals(DEFAULT_RADIO_MANIFACTURER, result.getProperties().get(FSInternetRadioBindingConstants.PROPERTY_MANUFACTURER));
assertEquals(DEFAULT_RADIO_MODEL_NUMBER, result.getProperties().get(FSInternetRadioBindingConstants.PROPERTY_MODEL));
}
Aggregations