Package org.fcrepo.server.access

Examples of org.fcrepo.server.access.FedoraAPIAMTOM.listMethods()


    @Test
    public void testListMethods1() throws Exception {
        FedoraAPIAMTOM apia = s_client.getAPIAMTOM();
        ObjectMethodsDef[] methods;

        methods = filterMethods(apia.listMethods(OBJECT_1_PID, null).toArray(new ObjectMethodsDef[0]));

        assertEquals("Wrong number of methods", 1, methods.length);
        assertEquals("Wrong method SDep", SDEF_1_PID, methods[0]
                .getServiceDefinitionPID());
        assertEquals("Wrong method", "content", methods[0].getMethodName());
View Full Code Here


    @Test
    public void testListMethods2() throws Exception {
        FedoraAPIAMTOM apia = s_client.getAPIAMTOM();
        ObjectMethodsDef[] methods;

        methods = filterMethods(apia.listMethods(OBJECT_2_PID, null).toArray(new ObjectMethodsDef[0]));

        assertEquals("Wrong number of methods!", 1, methods.length);
        assertEquals("Wrong method SDef!", SDEF_2_PID, methods[0]
                .getServiceDefinitionPID());
        assertEquals("Wrong method", "content2", methods[0].getMethodName());
View Full Code Here

    @Test
    public void testListMethods1_2() throws Exception {
        FedoraAPIAMTOM apia = s_client.getAPIAMTOM();
        ObjectMethodsDef[] methods;

        methods = filterMethods(apia.listMethods(OBJECT_1_2_PID, null).toArray(new ObjectMethodsDef[0]));
        assertEquals("Too many methods!", 2, methods.length);
        assertNotSame("SDefs are duplicated", methods[0]
                .getServiceDefinitionPID(), methods[1]
                .getServiceDefinitionPID());
        assertNotSame("methods are duplicated",
View Full Code Here

    @Test
    public void testListMethods3() throws Exception {
        FedoraAPIAMTOM apia = s_client.getAPIAMTOM();
        ObjectMethodsDef[] methods;

        methods = filterMethods(apia.listMethods(OBJECT_3_PID, null).toArray(new ObjectMethodsDef[0]));
        assertEquals("Too many methods!", 2, methods.length);
        assertNotSame("SDefs are duplicated", methods[0]
                .getServiceDefinitionPID(), methods[1]
                .getServiceDefinitionPID());
        assertNotSame("methods are duplicated",
View Full Code Here

    @Test
    public void testListMethods4() throws Exception {
        FedoraAPIAMTOM apia = s_client.getAPIAMTOM();
        ObjectMethodsDef[] methods;

        methods = filterMethods(apia.listMethods(OBJECT_4_PID, null).toArray(new ObjectMethodsDef[0]));
        assertEquals("Too many methods!", 3, methods.length);
        assertNotSame("SDefs are duplicated", methods[0]
                .getServiceDefinitionPID(), methods[1]
                .getServiceDefinitionPID());
        assertNotSame("SDefs are duplicated", methods[0]
View Full Code Here

    @Test
    public void testListMethods() throws Exception {
        FedoraAPIAMTOM apia = s_client.getAPIAMTOM();
        ObjectMethodsDef[] methods;

        methods = filterMethods(apia.listMethods(OBJECT_PID, null).toArray(new ObjectMethodsDef[0]));

        assertEquals("Wrong number of methods", 1, methods.length);
        assertEquals(methods[0].getServiceDefinitionPID(), SDEF_PID);
        assertEquals(methods[0].getMethodName(), SDEF_METHOD);
    }
View Full Code Here

    /* Assure that listMethods works as advertised */
    private void testListMethods() throws Exception {
        FedoraAPIAMTOM apia = s_client.getAPIAMTOM();
        ObjectMethodsDef[] methods;

        methods = filterMethods(apia.listMethods(OBJECT_1_PID, null).toArray(new ObjectMethodsDef[0]));

        assertEquals("Wrong number of methods", 2, methods.length);
        assertNotSame("SDeps are not distinct", methods[0]
                .getServiceDefinitionPID(), methods[1]
                .getServiceDefinitionPID());
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.