Examples of WithThreeConstructorsOneInjectModel


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
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.