Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2015-04-09 23:39:55 +0000
committerslewis2015-04-09 23:39:55 +0000
commit1c90bd4044a6779ac116a77328bdace160683ac7 (patch)
treed50890d1a9f91292fa3bbc5def845d88eb5e1104 /tests/bundles
parent12a635490480d183858fd15e9cf7356fcbefa7d6 (diff)
downloadorg.eclipse.ecf-1c90bd4044a6779ac116a77328bdace160683ac7.tar.gz
org.eclipse.ecf-1c90bd4044a6779ac116a77328bdace160683ac7.tar.xz
org.eclipse.ecf-1c90bd4044a6779ac116a77328bdace160683ac7.zip
Update to use latest EndpointDescriptionWriter API
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.java19
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

Back to the top