Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2008-04-30 12:32:41 -0400
committermkuppe2008-04-30 12:32:41 -0400
commit704eb346b0b0bffbf2718244fdb6a3fe2fe08f4d (patch)
treed9aceb901d7528ac7dd40bb7891610e845b2ebd9 /tests/bundles/org.eclipse.ecf.tests.provider.jslp
parent559a25bfb56a6076126f450062797cfe9b6ab366 (diff)
downloadorg.eclipse.ecf-704eb346b0b0bffbf2718244fdb6a3fe2fe08f4d.tar.gz
org.eclipse.ecf-704eb346b0b0bffbf2718244fdb6a3fe2fe08f4d.tar.xz
org.eclipse.ecf-704eb346b0b0bffbf2718244fdb6a3fe2fe08f4d.zip
FIXED - bug 228876: [Discovery][jSLP] org.eclipse.ecf.provider.jslp.container.JSLPServiceInfo.getServiceURL() needs to remove "IANA" itself
https://bugs.eclipse.org/bugs/show_bug.cgi?id=228876
Diffstat (limited to 'tests/bundles/org.eclipse.ecf.tests.provider.jslp')
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/identity/JSLPServiceIDTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/identity/JSLPServiceIDTest.java b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/identity/JSLPServiceIDTest.java
index ba5fe4cda..c7d808662 100755
--- a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/identity/JSLPServiceIDTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/identity/JSLPServiceIDTest.java
@@ -19,6 +19,8 @@ import org.eclipse.ecf.tests.discovery.identity.ServiceIDTest;
public class JSLPServiceIDTest extends ServiceIDTest {
+ private static final String IANA = "iana";
+
public JSLPServiceIDTest() {
super(JSLPNamespace.NAME);
}
@@ -39,4 +41,19 @@ public class JSLPServiceIDTest extends ServiceIDTest {
assertTrue(Arrays.equals(new String[] {"default"}, stid.getScopes()));
assertTrue(Arrays.equals(new String[] {"unknown"}, stid.getProtocols()));
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ecf.tests.discovery.identity.ServiceIDTest#testCreateServiceTypeIDFromInternalString()
+ */
+ public void testCreateServiceTypeIDFromInternalStringWithDefaultNamingAuthority() {
+ final String internalRep = "service:foo." + IANA + ":bar";
+ final IServiceID sid = (IServiceID) createIDFromString(internalRep);
+ final IServiceTypeID stid = sid.getServiceTypeID();
+
+ // the internalRep contains "iana" but getInternal may not!
+ final int indexOf = stid.getInternal().toLowerCase().indexOf(IANA.toLowerCase());
+ assertTrue(indexOf == -1);
+ assertEquals(IANA, stid.getNamingAuthority().toLowerCase());
+ assertNotSame(internalRep, stid.getName());
+ }
}

Back to the top