use of org.opencastproject.mediapackage.identifier.Handle in project opencast by opencast.
the class HandleBuilderTest method testCreateNew.
/**
* Test method for {@link org.opencastproject.mediapackage.identifier.HandleBuilderImpl#createNew()} .
*/
@Test
public void testCreateNew() {
Handle handle = null;
try {
handle = handleBuilder.createNew();
newHandles.add(handle);
assertNotNull(handle);
assertNotNull(handle.getNamingAuthority());
assertNotNull(handle.getLocalName());
assertNotNull(handle.resolve());
} catch (HandleException e) {
fail("Error creating handle: " + e.getMessage());
}
}
use of org.opencastproject.mediapackage.identifier.Handle in project opencast by opencast.
the class HandleTest method testCompact.
/**
* Test method for {@link org.opencastproject.mediapackage.identifier.HandleImpl#compact()} .
*/
@Test
public void testCompact() {
String hdlValue = "10.0001/abcde/test";
Handle handle = handleBuilder.fromString(hdlValue);
assertEquals("10.0001-abcde-test", handle.compact());
}
Aggregations