Package org.apache.sling.models.it.models.implextend

Examples of org.apache.sling.models.it.models.implextend.SampleServiceInterface


    /**
     * Try to adapt to interface, with an different implementation class that has the @Model annotation
     */
    @Test
    public void testImplementsInterfaceModel() {
        SampleServiceInterface model = adapterManager.getAdapter(resource, SampleServiceInterface.class);
        assertNotNull(model);
        assertEquals(ImplementsInterfacePropertyModel.class, model.getClass());
        assertEquals(firstValue + "|" + secondValue + "|" + thirdValue, model.getAllProperties());
    }
View Full Code Here


        childNode.setProperty("third", thirdValue);
        session.save();
       
        Resource childResource = resolver.getResource(childNode.getPath());
       
        SampleServiceInterface model = adapterManager.getAdapter(childResource, SampleServiceInterface.class);
        assertNotNull(model);
        assertEquals(ImplementsInterfacePropertyModel2.class, model.getClass());
        assertEquals(firstValue + "|" + secondValue + "|" + thirdValue, model.getAllProperties());
       
        childNode.remove();
        session.save();
    }
View Full Code Here

TOP

Related Classes of org.apache.sling.models.it.models.implextend.SampleServiceInterface

Copyright © 2018 www.massapicom. 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.