Search in sources :

Example 6 with IIDEntry

use of org.eclipse.ecf.storage.IIDEntry in project ecf by eclipse.

the class IDStoreTest method testGetIDEntries.

public void testGetIDEntries() throws Exception {
    final ID newGUID = IDFactory.getDefault().createGUID();
    idStore.store(newGUID);
    // Get namespace entry
    final INamespaceEntry namespaceEntry = idStore.getNamespaceEntry(newGUID.getNamespace());
    assertNotNull(namespaceEntry);
    final IIDEntry[] idEntries = namespaceEntry.getIDEntries();
    assertTrue(idEntries.length == 1);
    // Create GUID from idEntry
    final ID persistedGUID = idEntries[0].createID();
    assertNotNull(persistedGUID);
    assertTrue(persistedGUID.equals(newGUID));
}
Also used : IIDEntry(org.eclipse.ecf.storage.IIDEntry) INamespaceEntry(org.eclipse.ecf.storage.INamespaceEntry) ID(org.eclipse.ecf.core.identity.ID)

Aggregations

IIDEntry (org.eclipse.ecf.storage.IIDEntry)6 ID (org.eclipse.ecf.core.identity.ID)4 INamespaceEntry (org.eclipse.ecf.storage.INamespaceEntry)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 ISecurePreferences (org.eclipse.equinox.security.storage.ISecurePreferences)1