Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2008-05-20 11:47:04 +0000
committermkuppe2008-05-20 11:47:04 +0000
commit836195b13b3bb99fc912b0bb64b574cd5df6763c (patch)
tree581f3b0381ac6077011784cf1210d841e6b5d92a
parente59bfa36b512f5be7559aa4517c055d19f5972c1 (diff)
downloadorg.eclipse.ecf-836195b13b3bb99fc912b0bb64b574cd5df6763c.tar.gz
org.eclipse.ecf-836195b13b3bb99fc912b0bb64b574cd5df6763c.tar.xz
org.eclipse.ecf-836195b13b3bb99fc912b0bb64b574cd5df6763c.zip
NEW - bug 232813: [Discovery][jSLP] No OSGi service is registered
https://bugs.eclipse.org/bugs/show_bug.cgi?id=232813 NEW - bug 218308: [Discovery][jSLP] org.eclipse.ecf.discovery.IDiscoveryContainerAdapter.getServices() doesn't return all "reachable" services https://bugs.eclipse.org/bugs/show_bug.cgi?id=218308
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.discovery/META-INF/MANIFEST.MF3
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/AbstractDiscoveryTest.java74
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/Activator.java40
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryServiceTest.java25
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryTest.java82
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryTestHelper.java38
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/ServiceInfoTest.java4
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/identity/ServiceIDTest.java18
8 files changed, 129 insertions, 155 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.discovery/META-INF/MANIFEST.MF b/tests/bundles/org.eclipse.ecf.tests.discovery/META-INF/MANIFEST.MF
index 77176a565..b1c9a16ed 100755
--- a/tests/bundles/org.eclipse.ecf.tests.discovery/META-INF/MANIFEST.MF
+++ b/tests/bundles/org.eclipse.ecf.tests.discovery/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@ Eclipse-LazyStart: true
Export-Package: org.eclipse.ecf.tests.discovery,
org.eclipse.ecf.tests.discovery.identity,
org.eclipse.ecf.tests.discovery.listener
-Import-Package: org.osgi.framework
+Import-Package: org.osgi.framework,
+ org.osgi.util.tracker;version="1.3.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
J2SE-1.4
diff --git a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/AbstractDiscoveryTest.java b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/AbstractDiscoveryTest.java
index 8179c61b5..6b7511f3b 100755
--- a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/AbstractDiscoveryTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/AbstractDiscoveryTest.java
@@ -11,61 +11,35 @@
package org.eclipse.ecf.tests.discovery;
-import java.util.Comparator;
+import java.net.InetAddress;
+import java.net.URI;
+import java.net.UnknownHostException;
import junit.framework.TestCase;
-import org.eclipse.ecf.core.IContainer;
-import org.eclipse.ecf.discovery.IDiscoveryContainerAdapter;
-import org.eclipse.ecf.discovery.IServiceInfo;
-import org.eclipse.ecf.discovery.identity.IServiceID;
-import org.eclipse.ecf.discovery.identity.ServiceIDFactory;
-
-/**
- *
- */
public abstract class AbstractDiscoveryTest extends TestCase {
-
- protected IContainer container = null;
- protected IDiscoveryContainerAdapter discoveryContainer = null;
- protected String containerUnderTest;
- protected long waitTimeForProvider;
- protected Comparator comparator;
-
- /**
- *
- */
- public AbstractDiscoveryTest() {
- super();
+ protected final static String NAMINGAUTHORITY = "IANA";
+ protected final static String SCOPE = "local";
+ protected final static String PROTOCOL = "tcp";
+ protected final static int PORT = 3282;
+
+ protected final static String[] SERVICES = new String[] {"service", "ecf", "tests"};
+ protected final static String SERVICE_TYPE = "_" + SERVICES[0] + "._" + SERVICES[1] + "._" + SERVICES[2] + "._" + PROTOCOL + "." + SCOPE + "._" + NAMINGAUTHORITY;
+
+ public URI createDefaultURI() {
+ return URI.create("foo://" + getAuthority() + "/");
}
-
- /**
- * @param name
- */
- public AbstractDiscoveryTest(String name) {
- super(name);
+
+ private String getAuthority() {
+ return System.getProperty("user.name") + "@" + getHost() + ":" + PORT;
}
-
- protected IDiscoveryContainerAdapter getAdapter(Class clazz) {
- final IDiscoveryContainerAdapter adapter = (IDiscoveryContainerAdapter) container.getAdapter(clazz);
- assertNotNull("Adapter must not be null", adapter);
- return adapter;
+
+ protected static String getHost() {
+ try {
+ return InetAddress.getLocalHost().getHostAddress();
+ } catch (UnknownHostException e) {
+ e.printStackTrace();
+ return "localhost";
+ }
}
-
- protected IServiceID createServiceID(String serviceType, String serviceName) throws Exception {
- return ServiceIDFactory.getDefault().createServiceID(discoveryContainer.getServicesNamespace(), serviceType, serviceName);
- }
-
- protected void registerService(IServiceInfo serviceInfo) throws Exception {
- assertNotNull(serviceInfo);
- assertNotNull(discoveryContainer);
- discoveryContainer.registerService(serviceInfo);
- }
-
- protected void unregisterService(IServiceInfo serviceInfo) throws Exception {
- assertNotNull(serviceInfo);
- assertNotNull(discoveryContainer);
- discoveryContainer.unregisterService(serviceInfo);
- }
-
} \ No newline at end of file
diff --git a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/Activator.java b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/Activator.java
index 60006922c..73e2d408b 100755
--- a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/Activator.java
+++ b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/Activator.java
@@ -13,6 +13,7 @@ package org.eclipse.ecf.tests.discovery;
import org.eclipse.ecf.discovery.service.IDiscoveryService;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
/**
* The activator class controls the plug-in life cycle
@@ -25,15 +26,7 @@ public class Activator implements BundleActivator {
// The shared instance
private static Activator plugin;
- // private ServiceTracker tracker;
- //
- // private ServiceRegistration discoveryRegistration;
-
- /**
- * The constructor
- */
- public Activator() {
- }
+ private ServiceTracker tracker;
/*
* (non-Javadoc)
@@ -41,11 +34,8 @@ public class Activator implements BundleActivator {
*/
public void start(BundleContext context) throws Exception {
plugin = this;
- // final IContainer container = ContainerFactory.getDefault().createContainer("ecf.discovery.jmdns");
- // container.connect(null, null);
- // discoveryRegistration = context.registerService(IDiscoveryService.class.getName(), container, null);
- // tracker = new ServiceTracker(context, IDiscoveryService.class.getName(), null);
- // tracker.open();
+ tracker = new ServiceTracker(context, IDiscoveryService.class.getName(), null);
+ tracker.open();
}
/*
@@ -53,14 +43,10 @@ public class Activator implements BundleActivator {
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
- // if (tracker != null) {
- // tracker.close();
- // tracker = null;
- // }
- // if (discoveryRegistration != null) {
- // discoveryRegistration.unregister();
- // discoveryRegistration = null;
- // }
+ if (tracker != null) {
+ tracker.close();
+ tracker = null;
+ }
plugin = null;
}
@@ -72,9 +58,11 @@ public class Activator implements BundleActivator {
public static Activator getDefault() {
return plugin;
}
-
- public IDiscoveryService getDiscoveryService() {
- throw new UnsupportedOperationException("not yet implemented");
- // return (IDiscoveryService) tracker.getService();
+
+ /**
+ * @return Tracker for all IDiscoveryServices
+ */
+ public ServiceTracker getDiscoveryServiceTracker() {
+ return tracker;
}
}
diff --git a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryServiceTest.java b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryServiceTest.java
index 3d63b4d2a..d58004de5 100755
--- a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryServiceTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryServiceTest.java
@@ -12,25 +12,34 @@
package org.eclipse.ecf.tests.discovery;
import org.eclipse.ecf.discovery.IDiscoveryContainerAdapter;
-import org.eclipse.ecf.discovery.service.IDiscoveryService;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
public abstract class DiscoveryServiceTest extends DiscoveryTest {
/**
* @param name
- * @param aDiscoveryContainerInterval
*/
- public DiscoveryServiceTest(String name, long aDiscoveryContainerInterval) {
- super(name, aDiscoveryContainerInterval);
+ public DiscoveryServiceTest(String name) {
+ super(name);
}
/* (non-Javadoc)
* @see org.eclipse.ecf.tests.discovery.DiscoveryTest#getAdapter(java.lang.Class)
*/
- protected IDiscoveryContainerAdapter getAdapter(Class clazz) {
- final IDiscoveryService discoveryService = Activator.getDefault().getDiscoveryService();
- assertNotNull(discoveryService);
- return discoveryService;
+ protected IDiscoveryContainerAdapter getAdapter(Class notNeeded) {
+ final ServiceTracker serviceTracker = Activator.getDefault().getDiscoveryServiceTracker();
+ assertNotNull(serviceTracker);
+ final ServiceReference[] serviceReferences = serviceTracker.getServiceReferences();
+ assertNotNull(serviceReferences);
+ for(int i = 0; i < serviceReferences.length; i++) {
+ ServiceReference sr = serviceReferences[i];
+ if(containerUnderTest.equals(sr.getProperty(IDiscoveryContainerAdapter.CONTAINER_CONNECT_TARGET))) {
+ return (IDiscoveryContainerAdapter) serviceTracker.getService(sr);
+ }
+ }
+ fail("No discovery provider by that name seems to be registered");
+ return null;
}
}
diff --git a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryTest.java b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryTest.java
index 97f719979..84ce344f7 100755
--- a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryTest.java
@@ -18,6 +18,7 @@ import java.util.Properties;
import org.eclipse.core.runtime.AssertionFailedException;
import org.eclipse.ecf.core.ContainerConnectException;
import org.eclipse.ecf.core.ContainerFactory;
+import org.eclipse.ecf.core.IContainer;
import org.eclipse.ecf.core.identity.IDCreateException;
import org.eclipse.ecf.core.identity.IDFactory;
import org.eclipse.ecf.core.identity.Namespace;
@@ -43,25 +44,70 @@ public abstract class DiscoveryTest extends AbstractDiscoveryTest {
protected IServiceInfo serviceInfo3;
protected IServiceID serviceID3;
- /**
- * @param name
- * @param aDiscoveryContainerInterval
- * @param aComparator
- */
- public DiscoveryTest(String name, long aDiscoveryContainerInterval, Comparator aComparator) {
- containerUnderTest = name;
- comparator = aComparator;
- // interval how often the provider discovers for services + 1/10 * discoveryInterval
- waitTimeForProvider = aDiscoveryContainerInterval + (aDiscoveryContainerInterval * 1 / 2);
+ protected String containerUnderTest;
+ protected long waitTimeForProvider = 1000;
+ protected Comparator comparator = new ServiceInfoComparator();
+ private String protocol = PROTOCOL;
+ private String scope = SCOPE;
+ private String namingAuthority = NAMINGAUTHORITY;
+
+ protected IContainer container = null;
+ protected IDiscoveryContainerAdapter discoveryContainer = null;
+
+
+ public DiscoveryTest(String name) {
+ super();
+ this.containerUnderTest = name;
+ }
+
+ protected IDiscoveryContainerAdapter getAdapter(Class clazz) {
+ final IDiscoveryContainerAdapter adapter = (IDiscoveryContainerAdapter) container.getAdapter(clazz);
+ assertNotNull("Adapter must not be null", adapter);
+ return adapter;
+ }
+
+ protected IServiceID createServiceID(String serviceType, String serviceName) throws Exception {
+ return ServiceIDFactory.getDefault().createServiceID(discoveryContainer.getServicesNamespace(), serviceType, serviceName);
+ }
+
+ protected void registerService(IServiceInfo serviceInfo) throws Exception {
+ assertNotNull(serviceInfo);
+ assertNotNull(discoveryContainer);
+ discoveryContainer.registerService(serviceInfo);
}
- public DiscoveryTest(String name, long aDiscoveryContainerInterval) {
- this(name, aDiscoveryContainerInterval, new ServiceInfoComparator());
+ protected void unregisterService(IServiceInfo serviceInfo) throws Exception {
+ assertNotNull(serviceInfo);
+ assertNotNull(discoveryContainer);
+ discoveryContainer.unregisterService(serviceInfo);
+ }
+
+ public void setWaitTimeForProvider(long aWaitTimeForProvider) {
+ this.waitTimeForProvider = aWaitTimeForProvider + (aWaitTimeForProvider * 1 / 2);
+ }
+
+ public void setComparator(Comparator comparator) {
+ this.comparator = comparator;
+ }
+
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ public void setScope(String scope) {
+ this.scope = scope;
+ }
+
+ public void setNamingAuthority(String namingAuthority) {
+ this.namingAuthority = namingAuthority;
+ }
+
+ public String getServiceType() {
+ return "_" + SERVICES[0] + "._" + SERVICES[1] + "._" + SERVICES[2] + "._" + protocol + "." + scope + "._" + namingAuthority;
}
/*
* (non-Javadoc)
- *
* @see junit.framework.TestCase#setUp()
*/
protected void setUp() throws Exception {
@@ -76,9 +122,9 @@ public abstract class DiscoveryTest extends AbstractDiscoveryTest {
assertNotNull(discoveryContainer);
final Properties props = new Properties();
- final URI uri = DiscoveryTestHelper.createDefaultURI();
+ final URI uri = createDefaultURI();
- serviceID = (IServiceID) IDFactory.getDefault().createID(discoveryContainer.getServicesNamespace(), new Object[] {DiscoveryTestHelper.SERVICE_TYPE, DiscoveryTestHelper.getHost()});
+ serviceID = (IServiceID) IDFactory.getDefault().createID(discoveryContainer.getServicesNamespace(), new Object[] {getServiceType(), getHost()});
assertNotNull(serviceID);
final ServiceProperties serviceProperties = new ServiceProperties(props);
serviceProperties.setPropertyString(DiscoveryTest.class.getName() + "servicePropertiesString", "serviceProperties");
@@ -89,14 +135,14 @@ public abstract class DiscoveryTest extends AbstractDiscoveryTest {
serviceInfo = new ServiceInfo(uri, serviceID, 0, 0, serviceProperties);
assertNotNull(serviceInfo);
- serviceID2 = (IServiceID) IDFactory.getDefault().createID(discoveryContainer.getServicesNamespace(), new Object[] {DiscoveryTestHelper.SERVICE_TYPE2, DiscoveryTestHelper.getHost()});
+ serviceID2 = (IServiceID) IDFactory.getDefault().createID(discoveryContainer.getServicesNamespace(), new Object[] {"_service._ecf._tests2._fooProtocol.fooScope._fooNA", getHost()});
assertNotNull(serviceID);
final ServiceProperties serviceProperties2 = new ServiceProperties(props);
serviceProperties2.setPropertyString("serviceProperties2", "serviceProperties2");
serviceInfo2 = new ServiceInfo(uri, serviceID2, 2, 2, serviceProperties2);
assertNotNull(serviceInfo2);
- serviceID3 = (IServiceID) IDFactory.getDefault().createID(discoveryContainer.getServicesNamespace(), new Object[] {DiscoveryTestHelper.SERVICE_TYPE3, DiscoveryTestHelper.getHost()});
+ serviceID3 = (IServiceID) IDFactory.getDefault().createID(discoveryContainer.getServicesNamespace(), new Object[] {"_service._ecf._tests3._barProtocol.barScope._barNA", getHost()});
assertNotNull(serviceID);
final ServiceProperties serviceProperties3 = new ServiceProperties(props);
serviceProperties3.setPropertyString("serviceProperties3", "serviceProperties3");
@@ -370,8 +416,6 @@ public abstract class DiscoveryTest extends AbstractDiscoveryTest {
fail("Some discovery unrelated threading issues?");
}
}
- if (i < 9)
- return;
}
assertNotNull("Test listener didn't receive discovery", testServiceListener.getEvent());
assertTrue("Container mismatch", testServiceListener.getEvent().getLocalContainerID().equals(container.getConnectedID()));
diff --git a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryTestHelper.java b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryTestHelper.java
deleted file mode 100755
index 3ac1321ef..000000000
--- a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/DiscoveryTestHelper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.ecf.tests.discovery;
-
-import java.net.InetAddress;
-import java.net.URI;
-import java.net.UnknownHostException;
-
-public class DiscoveryTestHelper {
- public final static String PROTOCOL = "tcp";
- public final static String SCOPE = "local";
- public final static String NAMINGAUTHORITY = "IANA";
-
- public final static String[] SERVICES = new String[] {"service", "ecf", "tests"};
- public final static String SERVICE_TYPE = "_service._ecf._tests._" + PROTOCOL + "." + SCOPE + "._" + NAMINGAUTHORITY;
- public final static String SERVICE_TYPE2 = "_service._ecf._tests2._" + "fooProtocol" + "." + "fooScope" + "._" + "fooNA";
- public final static String SERVICE_TYPE3 = "_service._ecf._tests3._" + "barProtocol" + "." + "barScope" + "._" + "barNA";
-
- public final static int PORT = 3282;
- public final static int PORT2 = 3283;
- public final static int PORT3 = 3284;
-
- public static URI createDefaultURI() {
- return createURI("foo://" + getAuthority() + "/");
- }
- public static URI createURI(String uri) {
- return URI.create(uri);
- }
- public static String getAuthority() {
- return System.getProperty("user.name") + "@" + getHost() + ":" + PORT;
- }
- public static String getHost() {
- try {
- return InetAddress.getLocalHost().getHostAddress();
- } catch (UnknownHostException e) {
- e.printStackTrace();
- return "localhost";
- }
- }
-}
diff --git a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/ServiceInfoTest.java b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/ServiceInfoTest.java
index 56f920bb1..70519fa24 100755
--- a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/ServiceInfoTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/ServiceInfoTest.java
@@ -13,8 +13,6 @@ package org.eclipse.ecf.tests.discovery;
import java.net.URI;
import java.util.Comparator;
-import junit.framework.TestCase;
-
import org.eclipse.ecf.core.identity.IDCreateException;
import org.eclipse.ecf.discovery.IServiceInfo;
import org.eclipse.ecf.discovery.IServiceProperties;
@@ -23,7 +21,7 @@ import org.eclipse.ecf.discovery.identity.IServiceID;
/**
*
*/
-public abstract class ServiceInfoTest extends TestCase {
+public abstract class ServiceInfoTest extends AbstractDiscoveryTest {
protected URI uri;
protected IServiceID serviceID;
diff --git a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/identity/ServiceIDTest.java b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/identity/ServiceIDTest.java
index 731b8c430..ba165e097 100755
--- a/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/identity/ServiceIDTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.discovery/src/org/eclipse/ecf/tests/discovery/identity/ServiceIDTest.java
@@ -12,8 +12,6 @@ package org.eclipse.ecf.tests.discovery.identity;
import java.util.Arrays;
-import junit.framework.TestCase;
-
import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.identity.IDCreateException;
import org.eclipse.ecf.core.identity.IDFactory;
@@ -21,9 +19,9 @@ import org.eclipse.ecf.core.identity.Namespace;
import org.eclipse.ecf.discovery.identity.IServiceID;
import org.eclipse.ecf.discovery.identity.IServiceTypeID;
import org.eclipse.ecf.discovery.identity.ServiceIDFactory;
-import org.eclipse.ecf.tests.discovery.DiscoveryTestHelper;
+import org.eclipse.ecf.tests.discovery.AbstractDiscoveryTest;
-public abstract class ServiceIDTest extends TestCase {
+public abstract class ServiceIDTest extends AbstractDiscoveryTest {
protected String namespace;
@@ -83,13 +81,13 @@ public abstract class ServiceIDTest extends TestCase {
* use case: consumer instantiates a IServiceTypeID with the generic (ECF) String
*/
public void testServiceTypeIDWithString() {
- final IServiceID sid = createIDFromString(DiscoveryTestHelper.SERVICE_TYPE);
+ final IServiceID sid = createIDFromString(SERVICE_TYPE);
final IServiceTypeID stid = sid.getServiceTypeID();
- assertEquals(stid.getName(), DiscoveryTestHelper.SERVICE_TYPE);
- assertEquals(stid.getNamingAuthority(), DiscoveryTestHelper.NAMINGAUTHORITY);
- assertTrue(Arrays.equals(stid.getProtocols(), new String[] {DiscoveryTestHelper.PROTOCOL}));
- assertTrue(Arrays.equals(stid.getScopes(), new String[] {DiscoveryTestHelper.SCOPE}));
- assertTrue(Arrays.equals(stid.getServices(), DiscoveryTestHelper.SERVICES));
+ assertEquals(stid.getName(), SERVICE_TYPE);
+ assertEquals(stid.getNamingAuthority(), NAMINGAUTHORITY);
+ assertTrue(Arrays.equals(stid.getProtocols(), new String[] {PROTOCOL}));
+ assertTrue(Arrays.equals(stid.getScopes(), new String[] {SCOPE}));
+ assertTrue(Arrays.equals(stid.getServices(), SERVICES));
}
/*

Back to the top