use of org.eclipse.ecf.storage.INamespaceEntry in project ecf by eclipse.
the class IDStoreTest method testGetLongIDEntries.
public void testGetLongIDEntries() throws Exception {
final ID newLongID = IDFactory.getDefault().createLongID(1);
idStore.store(newLongID);
// Get namespace entry
final INamespaceEntry namespaceEntry = idStore.getNamespaceEntry(newLongID.getNamespace());
assertNotNull(namespaceEntry);
final IIDEntry[] idEntries = namespaceEntry.getIDEntries();
assertTrue(idEntries.length == 1);
// Create LongID from idEntry
final ID persistedLongID = idEntries[0].createID();
assertNotNull(persistedLongID);
assertTrue(persistedLongID.equals(newLongID));
}
use of org.eclipse.ecf.storage.INamespaceEntry 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));
}
Aggregations