diff options
author | slewis | 2015-04-09 23:39:55 +0000 |
---|---|---|
committer | slewis | 2015-04-09 23:39:55 +0000 |
commit | 1c90bd4044a6779ac116a77328bdace160683ac7 (patch) | |
tree | d50890d1a9f91292fa3bbc5def845d88eb5e1104 /tests/bundles | |
parent | 12a635490480d183858fd15e9cf7356fcbefa7d6 (diff) | |
download | org.eclipse.ecf-1c90bd4044a6779ac116a77328bdace160683ac7.tar.gz org.eclipse.ecf-1c90bd4044a6779ac116a77328bdace160683ac7.tar.xz org.eclipse.ecf-1c90bd4044a6779ac116a77328bdace160683ac7.zip |
Update to use latest EndpointDescriptionWriter API
Change-Id: Ife2d8b24474e49a950bcc64f4bf3bd5314b3b4d0
Diffstat (limited to 'tests/bundles')
-rw-r--r-- | tests/bundles/org.eclipse.ecf.tests.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/tests/osgi/services/remoteserviceadmin/AbstractEndpointDescriptionWriterTest.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/tests/osgi/services/remoteserviceadmin/AbstractEndpointDescriptionWriterTest.java b/tests/bundles/org.eclipse.ecf.tests.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/tests/osgi/services/remoteserviceadmin/AbstractEndpointDescriptionWriterTest.java index 471705511..653741d71 100644 --- a/tests/bundles/org.eclipse.ecf.tests.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/tests/osgi/services/remoteserviceadmin/AbstractEndpointDescriptionWriterTest.java +++ b/tests/bundles/org.eclipse.ecf.tests.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/tests/osgi/services/remoteserviceadmin/AbstractEndpointDescriptionWriterTest.java @@ -83,18 +83,21 @@ public abstract class AbstractEndpointDescriptionWriterTest extends public IServiceInfo createServiceInfo( IDiscoveryAdvertiser advertiser, org.osgi.service.remoteserviceadmin.EndpointDescription endpointDescription) { - try { - StringWriter sr = new StringWriter(); - sr.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append("\n"); - writer.writeEndpointDescriptions(sr, new EndpointDescription[] { (EndpointDescription) endpointDescription }); - System.out.print(sr.toString()); - } catch (IOException e) { - e.printStackTrace(); - } + writeEndpointDescription(endpointDescription); return super.createServiceInfo(advertiser, endpointDescription); } } + protected static void writeEndpointDescription( + org.osgi.service.remoteserviceadmin.EndpointDescription endpointDescription) { + try { + // Print to system out + System.out.println(new EndpointDescriptionWriter().writeEndpointDescription(endpointDescription).toString()); + } catch (IOException e) { + e.printStackTrace(); + } + } + public void testRegisterOnCreatedServer() throws Exception { // Make sure we take precedence over default ISIF |