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

Examples of org.apache.sling.models.testmodels.classes.constructorinjection.WithThreeConstructorsOneInjectModel


     * Test model object with three constructors, and make sure that one with @Inject is picked for instantiation.
     * Test mixing of constructor injection and field injection as well.
     */
    @Test
    public void testThreeConstructorsOneInjectInjection() {
        WithThreeConstructorsOneInjectModel model = factory.getAdapter(request,
                WithThreeConstructorsOneInjectModel.class);
        assertNotNull(model);
        assertNull(model.getRequest());
        assertEquals(INT_VALUE, model.getAttribute());
        assertEquals(STRING_VALUE, model.getAttribute2());
    }
View Full Code Here

TOP

Related Classes of org.apache.sling.models.testmodels.classes.constructorinjection.WithThreeConstructorsOneInjectModel

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.