Package org.apache.sling.models.testmodels.classes

Examples of org.apache.sling.models.testmodels.classes.ResourcePathAllOptionalModel


    }

    @Test
    public void testOptionalPathInjectionWithNonResourceAdaptable() {
        SlingHttpServletRequest nonResourceAdaptable = mock(SlingHttpServletRequest.class);
        ResourcePathAllOptionalModel model = factory.getAdapter(nonResourceAdaptable, ResourcePathAllOptionalModel.class);
        // should not be null because resource paths fields are optional
        assertNotNull(model);
        // but the field itself are null
        assertNull(model.getFromPath());
        assertNull(model.getByDerefProperty());
        assertNull(model.getFromPath2());
        assertNull(model.getByDerefProperty2());
   }
View Full Code Here

TOP

Related Classes of org.apache.sling.models.testmodels.classes.ResourcePathAllOptionalModel

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.