use of org.eclipse.ecf.discovery.identity.ServiceTypeID in project ecf by eclipse.
the class ServiceIDTest method createIDFromStringWithEx.
protected IServiceTypeID createIDFromStringWithEx(String serviceType) {
Namespace namespaceByName = IDFactory.getDefault().getNamespaceByName(namespace);
ServiceTypeID serviceTypeID = new ServiceTypeID(namespaceByName, serviceType);
return ServiceIDFactory.getDefault().createServiceTypeID(namespaceByName, serviceTypeID);
}
use of org.eclipse.ecf.discovery.identity.ServiceTypeID in project ecf by eclipse.
the class ServiceIDTest method testServiceIDFactory2.
/*
* org.eclipse.ecf.discovery.identity.IServiceIDFactory.createServiceID(Namespace, String, String)
*/
public void testServiceIDFactory2() {
Namespace namespaceByName = IDFactory.getDefault().getNamespaceByName(namespace);
ServiceTypeID serviceTypeID = new ServiceTypeID(new TestNamespace(), "_service._ecf._foo._bar._tcp.ecf.eclipse.org._IANA");
IServiceTypeID aServiceTypeID = ServiceIDFactory.getDefault().createServiceTypeID(namespaceByName, serviceTypeID);
assertNotNull(aServiceTypeID);
// members should be the same
assertEquals(aServiceTypeID.getNamingAuthority(), serviceTypeID.getNamingAuthority());
assertTrue(Arrays.equals(aServiceTypeID.getServices(), serviceTypeID.getServices()));
assertTrue(Arrays.equals(aServiceTypeID.getScopes(), serviceTypeID.getScopes()));
assertTrue(Arrays.equals(aServiceTypeID.getProtocols(), serviceTypeID.getProtocols()));
assertSame(namespaceByName, aServiceTypeID.getNamespace());
}
Aggregations