Search in sources :

Example 41 with Namespace

use of org.eclipse.ecf.core.identity.Namespace in project ecf by eclipse.

the class GUIDTest method testEqualNamespaces.

public void testEqualNamespaces() throws Exception {
    final ID id1 = createID();
    final ID id2 = createID();
    final Namespace ns1 = id1.getNamespace();
    final Namespace ns2 = id2.getNamespace();
    assertTrue(ns1.equals(ns2));
    assertTrue(ns2.equals(ns2));
}
Also used : ID(org.eclipse.ecf.core.identity.ID) GUID(org.eclipse.ecf.core.identity.GUID) Namespace(org.eclipse.ecf.core.identity.Namespace)

Example 42 with Namespace

use of org.eclipse.ecf.core.identity.Namespace in project ecf by eclipse.

the class GUIDTest method testGetNamespace.

public void testGetNamespace() throws Exception {
    final ID id = createID();
    final Namespace ns = id.getNamespace();
    assertNotNull(ns);
}
Also used : ID(org.eclipse.ecf.core.identity.ID) GUID(org.eclipse.ecf.core.identity.GUID) Namespace(org.eclipse.ecf.core.identity.Namespace)

Example 43 with Namespace

use of org.eclipse.ecf.core.identity.Namespace in project ecf by eclipse.

the class IIDNamespaceTest method testIDFactoryAddNamespace.

public void testIDFactoryAddNamespace() {
    Namespace namespace = createNamespace();
    int currentSize = fixture.getNamespaces().size();
    Namespace ns = fixture.addNamespace(namespace);
    assertNull(ns);
    assertTrue(fixture.getNamespaces().size() == (currentSize + 1));
    assertNotNull(fixture.removeNamespace(namespace));
}
Also used : Namespace(org.eclipse.ecf.core.identity.Namespace)

Example 44 with Namespace

use of org.eclipse.ecf.core.identity.Namespace in project ecf by eclipse.

the class LongIDTest method testGetNamespace.

public void testGetNamespace() throws Exception {
    final ID id = createID();
    final Namespace ns = id.getNamespace();
    assertNotNull(ns);
}
Also used : ID(org.eclipse.ecf.core.identity.ID) Namespace(org.eclipse.ecf.core.identity.Namespace)

Example 45 with Namespace

use of org.eclipse.ecf.core.identity.Namespace in project ecf by eclipse.

the class NamespaceTest method testNewNamespaceCreateInstance.

public void testNewNamespaceCreateInstance() {
    Namespace ns = createNamespace();
    try {
        ns.createInstance(null);
        fail("createInstance did not return null");
    } catch (IDCreateException e) {
    }
}
Also used : IDCreateException(org.eclipse.ecf.core.identity.IDCreateException) Namespace(org.eclipse.ecf.core.identity.Namespace)

Aggregations

Namespace (org.eclipse.ecf.core.identity.Namespace)51 ID (org.eclipse.ecf.core.identity.ID)10 IServiceTypeID (org.eclipse.ecf.discovery.identity.IServiceTypeID)10 IDCreateException (org.eclipse.ecf.core.identity.IDCreateException)9 ContainerConnectException (org.eclipse.ecf.core.ContainerConnectException)5 JSLPNamespace (org.eclipse.ecf.provider.jslp.identity.JSLPNamespace)4 GUID (org.eclipse.ecf.core.identity.GUID)3 UnknownHostException (java.net.UnknownHostException)2 UUID (java.util.UUID)2 IContainer (org.eclipse.ecf.core.IContainer)2 ContainerConnectedEvent (org.eclipse.ecf.core.events.ContainerConnectedEvent)2 ContainerConnectingEvent (org.eclipse.ecf.core.events.ContainerConnectingEvent)2 StringID (org.eclipse.ecf.core.identity.StringID)2 IConnectContext (org.eclipse.ecf.core.security.IConnectContext)2 ECFException (org.eclipse.ecf.core.util.ECFException)2 ServiceTypeID (org.eclipse.ecf.discovery.identity.ServiceTypeID)2 IPresenceContainerAdapter (org.eclipse.ecf.presence.IPresenceContainerAdapter)2 SimpleResolver (org.xbill.DNS.SimpleResolver)2 URI (java.net.URI)1 Map (java.util.Map)1