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

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


        factory.bindInjectAnnotationProcessorFactory(new ResourcePathInjector(), new ServicePropertiesMap(3, 2500));
    }

    @Test
    public void testPathInjection() {
        ResourcePathModel model = factory.getAdapter(adaptable, ResourcePathModel.class);
        assertNotNull(model);
        assertEquals(byPathResource, model.getFromPath());
        assertEquals(byPropertyValueResource, model.getByDerefProperty());
        assertEquals(byPathResource2, model.getFromPath2());
        assertEquals(byPropertyValueResource2, model.getByDerefProperty2());
    }
View Full Code Here


    }

    @Test
    public void testPathInjectionWithNonResourceAdaptable() {
        SlingHttpServletRequest nonResourceAdaptable = mock(SlingHttpServletRequest.class);
        ResourcePathModel model = factory.getAdapter(nonResourceAdaptable, ResourcePathModel.class);
        // should be null because mandatory fields could not be injected
        assertNull(model);
    }
View Full Code Here

TOP

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

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.