Search in sources :

Example 1 with OptionalArrayOSGiModel

use of org.apache.sling.models.testmodels.classes.OptionalArrayOSGiModel in project sling by apache.

the class OSGiInjectionTest method testOptionalArrayOSGiModelField.

@Test
public void testOptionalArrayOSGiModelField() throws Exception {
    Resource res = mock(Resource.class);
    OptionalArrayOSGiModel model = factory.getAdapter(res, OptionalArrayOSGiModel.class);
    assertNotNull(model);
    assertNull(model.getServices());
    verifyNoMoreInteractions(res);
}
Also used : Resource(org.apache.sling.api.resource.Resource) OptionalArrayOSGiModel(org.apache.sling.models.testmodels.classes.OptionalArrayOSGiModel) Test(org.junit.Test)

Aggregations

Resource (org.apache.sling.api.resource.Resource)1 OptionalArrayOSGiModel (org.apache.sling.models.testmodels.classes.OptionalArrayOSGiModel)1 Test (org.junit.Test)1