Examples of PID


Examples of org.fcrepo.common.PID

            fail(e.getMessage());
        }
    }

    public void testgetLastPID() {
        PID pid;
        try {
            pid = testPIDGenerator.getLastPID();
        } catch (UnsupportedOperationException e) {
            // optional
        } catch (IOException e) {
View Full Code Here

Examples of org.fcrepo.common.PID

    /**
     * hashCode() should return the same value for lexically equivalent PIDs.
     */
    @Test
    public void testHashCodeSamePID() throws Exception {
        PID pid1 = PID.getInstance("test:somepid");
        PID pid2 = new PID("test:somepid");
        PID pid3 = PID.fromFilename("test_somepid");
        assertEquals(pid1.hashCode(), pid2.hashCode());
        assertEquals(pid2.hashCode(), pid3.hashCode());
    }
View Full Code Here

Examples of org.fcrepo.common.PID

    /**
     * equals() should return true for lexically equivalent PIDs.
     */
    @Test
    public void testEqualsSamePID() throws Exception {
        PID pid1 = PID.getInstance("test:somepid");
        PID pid2 = new PID("test:somepid");
        PID pid3 = PID.fromFilename("test_somepid");
        assertEquals(pid1, pid2);
        assertEquals(pid2, pid3);
    }
View Full Code Here

Examples of org.fcrepo.common.PID

    /**
     * equals() should return false for lexically distinct PIDs.
     */
    @Test
    public void testEqualsDifferentPID() throws Exception {
        PID pid1 = PID.getInstance("test:somepid");
        PID pid2 = new PID("test:someotherpid");
        PID pid3 = PID.fromFilename("test_yetanotherpid");
        assertFalse(pid1.equals(pid2));
        assertFalse(pid2.equals(pid1));
        assertFalse(pid2.equals(pid3));
        assertFalse(pid3.equals(pid2));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.