protected void readDevice(String invalidXMLFile, UpnpService upnpService) throws Exception {
   RemoteDevice device = new RemoteDevice(SampleData.createRemoteDeviceIdentity());
   upnpService
       .getConfiguration()
       .getDeviceDescriptorBinderUDA10()
       .describe(device, IO.readLines(getClass().getResourceAsStream(invalidXMLFile)));
 }
Beispiel #2
0
  public LocalDevice createTestDevice(Class serviceClass) throws Exception {

    LocalServiceBinder binder = new AnnotationLocalServiceBinder();
    LocalService svc = binder.read(serviceClass);
    svc.setManager(new DefaultServiceManager(svc, serviceClass));

    return new LocalDevice(
        SampleData.createLocalDeviceIdentity(),
        new DeviceType("mydomain", "CustomDevice", 1),
        new DeviceDetails("A Custom Device"),
        svc);
  }